Google Analytics Anonymize IP

Hi there,

the Google Analytics plugin has changed, and I cannot add the tracking code anymore, simply the Tracking ID.
Where do I need to insert the code to anonymize IPs?
Can I put that into the Meta Tags box?

Thanks for getting back to me!
Best
Lisa

Hello Lisa,

Thanks for asking. :slight_smile:

You need to add the code in child theme function.php file. Before that I suggest you to install and activate child theme. You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

After that add following code in child theme function.php file to setup Google Analytics code.

function third_party_tracking_code() { ?>

      <script>
       
      // Google Analytics.
      </script>

    <?php }

    add_action( 'wp_head', 'third_party_tracking_code' );  



Replace // Google Analytics. with the tracking code.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.