Tagged: x
-
AuthorPosts
-
February 6, 2017 at 4:33 am #1359428
miribetancourtParticipantHi Themeco,
in Germany, you have to give users the chance to opt out cookies. Therefore, I have to make some changes.
To get everything working I have to add the following javascript just in front of the tracking code of GoogleAnalytics:
<script>
var gaProperty = ‘UA-XXXXXXX-X’;
var disableStr = ‘ga-disable-‘ + gaProperty;
if (document.cookie.indexOf(disableStr + ‘=true’) > -1) {
window[disableStr] = true;
}
function gaOptout() {
document.cookie = disableStr + ‘=true; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/’;
window[disableStr] = true;
}
</script>Do I have to insert the code at the plugin (x-google-analytics)?
If yes, in which folder?
If no, where can I make the changes?And what is the correct position?
I am fairly new at working with code so that I have very basic questions.
Thanks for your help.
Cheers, Miriam
February 6, 2017 at 4:52 am #1359446
miribetancourtParticipantHi,
and one additional question: In Germany, you have to make some anonymizing changes in the standard code of google analytics. Therefore, I have to add (‘set’, ‘anonymizeIp’, true); in the Google Analytics Code. Can I do that in the plug in oder somewhere else? In the child theme?
Thanks for you help?
Cheers, Miriam
February 6, 2017 at 4:59 am #1359451
ChristianModeratorHey Miriam,
You can put your code in the X Google Analytics extension. Please see https://community.theme.co/kb/extension-google-analytics/ for usage instructions.
Regarding Google Analytics settings, you need to contact Google Analytics support as the extension basically accepts code and has no further setting except the code position.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1359428 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
