Honoring do-no-track cookies using OneTrust | Community
Skip to main content
Dan_Stevens_
Level 10
March 7, 2022
Solved

Honoring do-no-track cookies using OneTrust

We are doing a POC to block Marketo lead tracking when performance cookies are blocked on the site. There is documentation available for this on https://developers.marketo.com/javascript-api/lead-tracking/ where we are asked to add querystring parameter “marketo_opt_out=true” to the URL to opt a user out. This is not a feasible solution for our website as we will need to refresh the page with the new query string. We will need to opt-out a user if the performance (tracking) cookies are disabled. We are looking for some documentation which includes some Javascript  which we can use to opt a user out, e.g., calling some marketo.optout() function if performance cookies are blocked.

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
March 8, 2022

Hi Dan,

 

The way OneTrust is designed shouldn’t require you to use the Marketo-specific feature.


Rather, OneTrust expects you to set up scripts with a non-executable type, like

<script type="text/not-a-script-type"></script>

This makes them HTML5 data blocks. They don’t run as-is.

 

Then depending on the end user’s opt-in settings, the script tags are reinjected as standard scripts (with no type override).

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
March 8, 2022

Hi Dan,

 

The way OneTrust is designed shouldn’t require you to use the Marketo-specific feature.


Rather, OneTrust expects you to set up scripts with a non-executable type, like

<script type="text/not-a-script-type"></script>

This makes them HTML5 data blocks. They don’t run as-is.

 

Then depending on the end user’s opt-in settings, the script tags are reinjected as standard scripts (with no type override).

Translate
Dan_Stevens_
Level 10
March 13, 2022

Thanks Sandy!

Translate