AnsweredAssumed Answered

Preventing embed forms from setting cookies/tracking before consent on website

Question asked by Bruno Gomes on Jul 12, 2019
Latest reply on Jul 12, 2019 by Sanford Whiteman

Hey there!


I currently use Marketo embed forms on my website, and I'm looking to prevent the tracking/cookies from munchkin before a users gives consent.


I have a Cookie Control setup that has two main toggle actions. onAccept and onRevoke. I'm looking for a guide to prevent Marketo from setting cookies before consent is given. And when the onAccept fires, then it will set cookies. Visitors can toggle on and off their consent at any given time. So I also need to be able to clear all the existing Marketo related cookies and tracking if they toggle to revoke consent. (onRevoke)


Is there a guide anywhere for this? I found a variety of topics and discussions, but most were for Marketo specific landing pages.


Maybe something along the lines of MktoForms2.whenReady(function(form) { }); function to delete the cookies and then firing Munchkin.init() again when consent is given? I tried a basic interaction to prevent "_mkto_trk" or removing it on page load, but it didn't really work. 


My cookie control solution lives inside Google Tag Manager and I was able to set trigger events to fire each one individually, but Marketo seems to be the only one I'm unable to solve this way.


 Can this be done with some basic javascript on my frontend or are there settings inside Marketo to prevent cookies from being set on page load?


Any info pointing me in the right direction would be very much appreciated. 

Also is this the right place for this question? I'm not familiar with Marketo community,


Kind regards,