Reply
Highlighted
Visitor
Posts: 6
Registered: ‎01-17-2018

Embed consent preferences inline

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

Reply
0 Kudos
Tealium Employee
Posts: 764
Registered: ‎09-01-2015

Re: Embed consent preferences inline

@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

Visitor
Posts: 6
Registered: ‎01-17-2018

Re: Embed consent preferences inline

Hi Dan,

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

Kind regards, 

Pafe

Reply
0 Kudos