Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #793046

    Hey Kriesi Team,

    it’s been a while since I last “bothered” you.

    Data privacy is an important topic. I recently run into a thing, which I did not cover before and actually don’t know how to handle it.

    In your theme options you provide a field for a Google Analytics tracking code. This is very comfortable, but it does’t allow me to make changes to the actual script.

    Here’s what I would like to achieve:

    • Add the anonymizeIp argument:

       ga('create', 'UA-XXXXXXXX-X', 'auto');
        ga('set', 'anonymizeIp', true);
        ga('send', 'pageview'); 
    • Include a script before the actual analytics code like this:

      <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>

    How can I achieve this?

    Hopefully you can help me here.

    Best wishes,

    Andreas

    #793089

    Hey andreasobermeier,
    Within the theme the Google Analytics Tracking Code box allows for your full script and code.

    Best regards,
    Mike

    #793093

    Hi Mike,

    thanks for the fast reply. That works.

    Thank you and best wishes,

    Andreas

    #793102

    Hi,
    Glad we were able to help, we will close this now. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.