Screen Shot 2015-12-17 at 2.54.47 PM.png

Leveraging RTP for EU e-Privacy

John_M
Marketo Employee
Marketo Employee

In a previous blog post (Handling Cookies and Privacy in the EU )  I talked through a method for conditionally loading Munchkin based on location. The solution depended on a 3rd party to provide the location based lookup data. In the meantime, I've revised the solution to leverage our very own RTP product, because one of the things that RTP does very well is determine the location of an anonymous lead without storing any personally identifiable information (PII)

Screen Shot 2015-12-17 at 2.54.47 PM.png

The first step is to define a segment which will trigger on any visitor from the EU, the EU countries being Austria, Belgium, Bulgaria, Croatia, Republic ofCyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia,Slovenia, Spain, Sweden and the UK. (whew)

Screen Shot 2015-12-17 at 4.02.16 PM.png

So, once we have that, we have a segment to match, and we can leverage the RTP Javascript API. Now, assuming you have RTP installed peroperly on your site, you can trigger a callback function with a single line of code

rtp('get', 'visitor', examineVisitor);

In the examineVisitor function you can do things like

1. Parse out the response and see if the user matches your segment (in my case, #3861, which I get by hovering over the name in RTP)

2. If the user if from the EU, check for the existence of your Marketo Preference cookie

3. If there is NO User Preference cookie...

     a. If the user is NOT in the EU, create it and set the User Preference cookie to "true", meaning trackable

     b. If the user is in the EU, trigger your behavior to get the visitor's tracking consent (or at least inform them), then set the cookie accordingly

4. If there is a User Preference cookie (or you just set it)...

     a. Act accordingly, either loading Munchkin.init() or not.. and if not, you likely want to expunge the cookie as well!

Easy, right?

696
0