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

Honoring do-no-track cookies using OneTrust

  • March 7, 2022
  • 1 reply
  • 2352 views

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.

Best answer by SanfordWhiteman

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).

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
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).

Dan_Stevens_
New Participant
March 13, 2022

Thanks Sandy!