Embed consent preferences inline

Gold Contributor
Gold Contributor

Hi there, 

Does someone have any experiences in embedding the consent preferences dialog inline (instead of as a pop up)? 

We would like to send an email to our users with a link to a landing page that contains their individual consent preferences. 

Kind regards, 

pafe

2 REPLIES 2

Embed consent preferences inline

Tealium Employee

@pafe

Yea I did that for https://tealium.com/preferences/.

You might want a JS Extension scoped to All Tags with the following to suppress the Explicit Consent Manager on the page with the inline preferences. I would suggest doing so.

if(b["dom.pathname"].indexOf("/preferences/")==0){
utag.gdpr.consent_prompt.noShow="true";
}

 

Then you'll need another JS Extension scoped to DOM Ready with the following to wait until the page is rendered and inject the Preferences code.

if (utag.data['dom.pathname'] == '/preferences/') { utag.gdpr.showConsentPreferences(); }

 

And within the Consent Manager Preferences JS, you'll want something like the following that will tell the page where to inject the inline Preferences.

var consent = document.getElementById('__tealiumGDPRcpPrefs');
jQuery("#text-block-7").replaceWith(consent);

 

Hope this helps!

Cheers,
-Dan

Embed consent preferences inline

Gold Contributor
Gold Contributor

Hi Dan,

Fantastic! Thank you very much for the explanation and the details!

Kind regards, 

Pafe

Public