Merge branch 'ticket-11957-removePersonalData' into develop

This commit is contained in:
Marion Muszynski 2016-12-06 11:53:59 +01:00
commit 908f81cea3
3 changed files with 11 additions and 3 deletions

View File

@ -45,7 +45,17 @@
'shipping': '{$trans.shipping}', // Shipping (currency). 'shipping': '{$trans.shipping}', // Shipping (currency).
}); });
ga('send', 'pageview'); {literal}
var re = new RegExp("([?&])(email=)[^&#]*", "g");
if (document.location.href.match(re)) {
// remove personal data from url before sending to GA
url = window.location.search.replace(re, '$1');
var page = window.location.pathname+url;
ga('send', 'pageview', page);
} else {
ga('send', 'pageview');
}
{/literal}
{/if} {/if}
{/if} {/if}

View File

@ -163,7 +163,6 @@
// remove personal data from url before sending to GA // remove personal data from url before sending to GA
url = window.location.search.replace(re, '$1'); url = window.location.search.replace(re, '$1');
var page = window.location.pathname+url; var page = window.location.pathname+url;
console.log(page);
ga('send', 'pageview', page); ga('send', 'pageview', page);
} else { } else {
ga('send', 'pageview'); ga('send', 'pageview');

View File

@ -169,7 +169,6 @@
// remove personal data from url before sending to GA // remove personal data from url before sending to GA
url = window.location.search.replace(re, '$1'); url = window.location.search.replace(re, '$1');
var page = window.location.pathname+url; var page = window.location.pathname+url;
console.log(page);
ga('send', 'pageview', page); ga('send', 'pageview', page);
} else { } else {
ga('send', 'pageview'); ga('send', 'pageview');