Difference between revisions of "Implementing EUGDPR in ConversionRuler"
m |
|||
Line 67: | Line 67: | ||
* [[EUGDPR]] | * [[EUGDPR]] | ||
* [[EUGDPR Home Page]] | * [[EUGDPR Home Page]] | ||
+ | * [[Market Ruler EUGDPR Privacy Statement]] | ||
[[Category:ConversionRuler]] | [[Category:ConversionRuler]] | ||
[[Category:ConversionRuler Installation]] | [[Category:ConversionRuler Installation]] | ||
[[Category:Privacy]] | [[Category:Privacy]] |
Revision as of 14:39, 17 May 2018
ConversionRuler can adhere to all aspects of GDPR as instituted and enforced in EU Countries starting May 2018.
To do so requires some modifications to the standard ConversionRuler Tracking Snippets and the following requirements:
- Web site visitors should support JavaScript
- The
<noscript>
tags associated with ConversionRuler must only be presented via a server-side include code once consent is given.
Contents
Conditional inclusion of ConversionRuler tracking: JavaScript Version
Requirements
- A custom version of the ConversionRuler tracking snippet
Implementation
To include ConversionRuler conditionally based on consent, a cookie must be set to a specific value. For these examples, we'll use the cookie named consent
and set it to a value of 1
when the visitor consents to be tracked.
Our ConversionRuler snippet code is then:
(function (w, cc, id, q) { var f="; ",s='script',d=w.document,p=d.getElementsByTagName(s)[0]; w.cr_load = function () { var n=d.createElement(s); w._crq=w._crq?w._crq:[]; w._crq.push(q); w._crq.push(function (cr) { cr.cookie(cc,1); }); n.src='//www.conversionruler.com/bin/js.php?siteid='+id; p.parentNode.insertBefore(n, p); }; if ((d.cookie+f).indexOf(cc+"=1"+f) >= 0) { w.cr_load(); } }(window,'consent','SITEID',0));
The above code is different in two significant ways from the standard ConversionRuler code:
- By default, ConversionRuler tracking is not loaded
- A new global function called
cr_load
is created which can be invoked immediately when consent is given.
The global function will:
- Load ConversionRuler and tracking code and record a landing for the page
- Set the
consent
cookie to the value1
Conditional inclusion of ConversionRuler tracking: Non-JavaScript Version
Tracking using ConversionRuler in browsers which do not have JavaScript enabled is as straightforward as displaying the <noscript>
tags conditionally when a cookie is received by the server software.
Requirements
- A server-side scripting environment
- The ability to check cookies sent to the server
- The ability to conditionally output page HTML based on the value of the cookies sent
Implementation
Using your server-side language, the code would appear as follows:
<?php if (isset($_COOKIE['consent']) && $_COOKIE['consent'] === '1') { $siteid = 'SITEID'; echo '<noscript><div style="position: fixed; left: 0; top: 0"><img src="https://www.conversionruler.com/bin/tracker.php?siteid=${siteid}&nojs=1" alt="" width="1" height="1" /></div></noscript>'; }
The quick explanation is that the server-side code checks to see if the consent
cookie is set, and if it is, then it outputs the <noscript>
to enable tracking.