Display Warning that cookies are not allowed

Hi there,

I was wondering if there is a possibility of showing an element on the page when specific category of cookies is not allowed?

Typical example: embedded video is being blocked because marketing/analytics cookies are not accepted by user. I want to display a warning that they need to accept cookies to view the video.

Is there some easy page-wide way of finding out the consent with some JS? e.g. IF marketing-analytics is not allowed, THEN display: block on #warning?

Thanks a lot!

Hello @vitopravil! This could potentially be done with the Consent API.

Could you share a link? I will try to get the JS for this working and report back :muscle:

Hi @Support-Luis, thanks for taking a look at this. There is no specific website link - I would love to have a generalized solution for this, so feel free to work with any selectors in the JS if you can. I think it would benefit a lot of folks if this would come as for instance another Attributes solution, or somehow implemented in the new Components app. But a JS snippet would be very appreciated for now!

Hey @vitopravil! I think we actually have already built this. Can you please check step 3 here?

You should be able to copy the video element and add the video inside it :thinking:

Great, thanks for the link! I just tested it and any element with the attribute “fs-consent-element=placeholder” will disappear when all cookie types are accepted. Pleeeeease highlight this somewhere in the general documentation, best somewhere here :smiley:


This is super useful for any type of embedded script, not just video iframes. I see you had some questions about this on the youtube video as well and I can imagine a lot of people are searching for this. Thanks for pointing me to the right direction.

1 Like

Thanks @vitopravil for the suggestion, I have already raised this with the team. :muscle:

1 Like