• Resolved ssoulless

    (@ssoulless)


    I have this code that integrates Google Ads and Google analytics in the same snippet:

    <!-- Global site tag (gtag.js) - Google Ads: 693771414 -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=AW-693771414"></script>
    <script>
      window.dataLayer = window.dataLayer || [];
      function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());
    
      gtag('config', 'UA-145665125-1');
      gtag('config', 'AW-693771414');
    </script>

    As you can see I have gtag('config', 'UA-145665125-1'); which connects Google analytics, not sure if I should remove that or is this whole code compatible with this plugin? should I remove it? but I need it for Google ads tracking!

    • This topic was modified 3 years, 11 months ago by ssoulless.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi!

    Are you getting any sort of error messages or notices with that snippet in place? Either in Google Ads, Google Analytics, or your site’s WP-admin dashboard?

    Thread Starter ssoulless

    (@ssoulless)

    No, but I noticed that I had to remove this line:

    gtag('config', 'UA-145665125-1');

    Because my bounce rate was near to 0% so I think it was recording analytics twice, after removing that line from my snippet it is working well now.

    I’m not getting any error messages, but not sure if Google ads script can live together with your plugin

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @ssoulless

    You may have issues here with duplicate data being sent to Google Analytics. However, eCommerce data with our plugin is only sent to Analytics when a purchase redirects to the thank you page.

    You could disable Universal Tracking if you find complications:

    https://docs.woocommerce.com/document/google-analytics-integration/#tracking-options

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Google Ads Code incompatibility?’ is closed to new replies.