Home Forums WoodMart support forum Google analytics code

Google analytics code

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

    Marloes2019
    Participant

    Hello,

    I have to put a code in WordPress to make sure the data Google Analytics collects about customers is anonymous.

    I have to fill in the folowing code:

    < script async src=”https://www.googletagmanager.com/gtag/js?id= UA- xxxxxxx-x “></ script>
    < script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag(‘js’, new Date());
    gtag(‘config’, ‘UA-xxxxxxx-x’, { ‘anonymize_ip’: true });
    </ script>

    I have seen how to do this with standard wordpress websites, but not with using the Woodmart theme.
    In this case, do I need to place the code in the Woodmart CSS generator?

    Thanks for your reply,

    #192310

    Hello,

    You would better use this free plugin: https://wordpress.org/plugins/insert-headers-and-footers/

    Best Regards

    #192314

    Marloes2019
    Participant

    Hi Elise,

    Yes I tried that before, but the code ends up visible on the website.
    Do you know if that has anything to do with the theme?
    I have attached a screenshot of what I mean.

    Kind Reagards,

    Marloes

    Attachments:
    You must be logged in to view attached files.
    #192417

    Hello,

    Please check your code for validity and integrity this plugin inserts the custom code correctly, provided it is correct and integral.

    Best Regards

Viewing 4 posts - 1 through 4 (of 4 total)