• Skip to main content
  • Skip to primary sidebar

WordPress, Genesis Framework and Storefront customization tutorials

  • Free
  • Premium
  • Membership
    • Login
  • Design
  • Blog
  • About
  • Contact
Home » How to adapt an existing global site tag for your Google Ads account

How to adapt an existing global site tag for your Google Ads account

2019-03-22 by Gabor Leave a Comment

If you already have a global site tag on each page of your website, you can configure it to send data to multiple Google Ads or Google Analytics accounts. Let’s take the example of a global site tag from a Google Analytics account. The global site tag would look like this:

 <!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID"></script>

  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'GA_TRACKING_ID');
  </script>

To add support for your Google Ads account, simply add the highlighted line to your global site tag, replacing “AW-CONVERSION_ID” with the unique ID supplied to you when you set up your conversion tracking tags.

<!-- Global site tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=GA_TRACKING_ID">   </script>

  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', 'GA_TRACKING_ID');
    gtag('config','AW-CONVERSION_ID');
  </script>

Filed Under: Free Tagged With: Analytics

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

  • Facebook
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • YouTube
WP Rocket - WordPress Caching Plugin
UpdraftPlus Premium

Disclosure: Some of the links in this site are affiliate links. I will be paid a commission if you use this link to make a purchase.

  • Privacy Policy
  • Terms of Service
  • Flames Design
© 2021 WP Flames - All Right Reserved