Schedule your FREE growth strategy session

If your website generates over $15k per month, let’s chat. We’ll discuss your goals and figure out how we can help your business get to its next stage of revenue and growth. (Others charge for this level of consultation.)

Fix your GMC Suspension

We’ve gotten Merchant Center suspensions lifted for our clients with a 100% success rate. We know what we’re doing here.

Client feedback

Mac Steer
Mac SteerSims Direct Owner
Read More
“Almost $4 million in revenue from basically nothing.”
Matt Childs
Matt ChildsWine Stash
Read More
“[They] helped us to more than 10x our conversions while decreasing the amount we're spending on Adwords almost every day.”
Ellen McCaleb
Ellen McCalebHeadwaters Studio
Read More
"My conversion rate went from like 1.83 to over 9%."
Pat Langley
Pat LangleyVaikobi
Read More
“We've been using them for just over a year now and we've had incredible success. We've grown our online business 145% and achieved a ROAS of 4.9. Fantastic return on investment!”
Read More
"Our ROI's went from 88% to 275%, which is huge."

Over 1.4 million views and growing fast on YouTube

We’re proud to be helping thousands of ecommerce business owners by giving the most digestible, battle-tested advice to be found online about succeeding with Google Ads.

Be sure to follow our channel to stay in the loop.

Google Ad Promo 1 (14)

Global Site Tag: What is it, and how does it affect your revenue?

Tags are used on websites to send information to third parties such as Google. They collect data, track ads, and target your ad campaigns and other functions.

It's a snippet of Javascript that you add to the site, and a Global Site Tag (gtag.js) allows you to manage multiple products with just one piece of code. We explore the Gtag and explain why you should have one on your site and how it works.

What is a Global Site Tag used for?

The gtag.js is a single tag you add to your website to use the various Google products and services. It used to be that you would need several tags on your site for different products, but the Gtag allows you to manage them all with one piece of code. 

It works with products such as Google Ads, Google Ads Campaign Manager, Google Analytics, Google Analytics 4, Display & Video 360, and Search Ads 360. The Gtag must be added to every page right after the <head> tag.

Sitewide tagging tools

A tag is only one of the sitewide tag solutions; others include the Google Tag Manager and Google Analytics using a Global site tag

The Global Site Tag (gtag.js) and the Google Tag Manager (GTM) will allow you to send tracking information to your Google Ads or Google Analytics Account. There are, however, a few distinct differences between the two.

The Gtag is only compatible with Google products, while the Google tag manager is compatible only with third-party products. In addition, the Google Tag Manager allows for more functionality, such as the testing of codes and version control. In contrast, the gtag.js is limited in functionality but easier to implement. 

The Google Tag Manager has a user-friendly interface that supports advanced functions, but Gtag is purely driven by Javascript installation for advanced tracking. Nevertheless, it's relatively easy to use, and you could likely install the tracking codes yourself without a developer. 

You can also send data to your Analytics account using an Analytics tag, which is also a snippet of Javascript. You can use this particular tag directly on the HTML of each site page or through Google Tag Manager or another tag management system.

What does a Gtag look like?

A Global Site Tag is several lines of code that you need to add to each page of your website. Here is an example of what the gtag.js looks like:

Google Site Tag

*If you set up Analytics on your site after August 2017, your site is probably tagged with gtag.js

*If you set up Analytics on your site before August 2017, your site is probably tagged with analytics.js.

When should you use a Global Site Tag?

A Global Site Tag is helpful in two instances; remarketing and conversion tracking. Use a Gtag to set up an audience source and reach people who have been to your website or used your app. The code allows you to add website visitors to your data segments which let you target ads to these visitors. 

The tag works in conjunction with another piece of code, phone snippet, or event snippet to track your conversions. The event snippet tells the site tag when it should track a conversion. The phone snippet works similarly but replaces your business number with a Google forwarding number.

The benefits of using a Global Site Tag

Implementing a Gtag across your website gives you access to several additional benefits and enhancements. 

  • A site tag will equip you to continue measuring conversions accurately if future changes occur.
  • It gives you codeless tag management by not having to change the tags on your page manually.
  • The Gtag is streamlined and easier to implement, with smooth integration with other Google products. 

The Global Site tag provides more accurate conversion data when cookies aren't available. It also helps to recover conversions not observed today due to industry-specific factors. 

Where should the Google Ads Gtag be placed?

You must add the Gtag snippet on all your web pages in your HTML's <head> section. Some themes have a special place dedicated to such code snippets. In Shopify, you need to place it in the Theme.Liquid section.

How to install the Gtag in Shopify

  1. When you set up the tag in Google Ads, choose the “Install the tag yourself” option.
  2. In the “Global Site Tag” section, generate the code based on your option.
  3. Copy the gtag.js.
  4. Open your Shopify admin panel and click on “Online Store.”
  5. Click “Actions” then “Edit code.”
  6. On the left-hand side, click on “theme.liquid”.
  7. Paste the copied Gtag between <head><head> tags to apply the snippet to every page on the website.

Pro tips:

  • Make sure there are no extra spaces before the code. You can use the tag assistant to check if the code is correctly inserted.
  • Remember that Google Ads doesn't allow using tags on pages with policy-restricted offers.

Configuring the Gtag for Google Analytics

Follow the instructions below to add your gtag.js for Google Analytics to your website.

  1. First, log in to your Google Analytics account.
  2. On the left-hand side, click on “Admin.”
  3. Select an account from the drop-down menu of the left column called “Account.”
  4. Select a property from the drop-down menu of the “Property” column.
  5. Click on “Tracking info,” then “Tracking Code.”
  6. You'll see your website's unique tracking ID, starting with a UA, shown at the top of the page. 
  7. Copy the gtag.js.
  8. Paste the snippet right after the <head> tag on each website page you want to track in GA.
  9. Locate the following text: GA_TRACKING_ID and replace it with the unique tracking ID provided by GA.

If you plan to use remarketing or audience demographics, then go to the “Data Collection” link and make sure that the “Remarketing” and “Advertising Reporting Features” boxes are set to “On.”

For ecommerce websites, there are another two features that need to be enabled – “Ecommerce settings” and “Ecommerce reporting.”

  • First, click on the “Ecommerce settings” link. 
  • Then, on the ecommerce set-up page, slide the “Enable ecommerce” bar to “On.” 
  • Next, do the same for the “Enable Enhanced Ecommerce Reporting.” 
  • Then click on “Save.”

These settings ensure that you're tracking your conversions and other relevant metrics. 

The Gtag, as mentioned above, is a sitewide Javascript API and tagging framework that sends data to GA. To install it onto your website, copy the following code and paste it after the <head> tag on every page of the site. 

The Global Site Tag is a JavaScript tagging framework and API. It allows you to send event data to Google Analytics. To install the gtag.js, you must copy the following code and place it after the <head> tag on each website page. 

Replace the highlighted section below, with the ID of the GA property to which you want to send data. You only need one code snippet per page.

Global site Tag

Where can I find the Global Site Tag for Google Ads?

Log in to your Google Ads account and navigate to the 

Tools and Settings > Shared Library > Audience manager > Your data sources> Google Ads tag.

Common questions:

I already have GA, Facebook Pixel, and another tracker installed on my landing page. Do I need to replace it with the Gtag?

You don't have to replace Google Analytics or the other tracker with the Global Site Tag Manager. It's actually better if you don't duplicate and install GTM or Gtag if you already have these installed, as it could cause issues with reporting.

Should I use Global Site Tag or Google Tag Manager?

You should switch to Global Site Tag (Gtag) if you have experience in Javascript and want to install the tags without fiddling with a tag management system. On the other hand, the GTM is useful if you want the freedom to set up or modify your triggers and events within a web interface and if you don't know hard coding or scripts.

Share this article:

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

'How To Write Successful
Google Ads'

Google Ad Ebook Cover
    We are committed to protecting your privacy, as described in our Privacy policy.
    Sam single blog pages

    I hope you enjoy reading this article.

    If you want us to help you scale up your ecommerce business, book a free strategy call.

    Subscribe to Our Newsletter to Improve Your eCommerce Digital Marketing!

    Thank you for your interest in our newsletters. We will send you only the most important news and updates. No spam, we promise.

    We are committed to protecting your privacy, as described in our Privacy policy.

    What’s your goal today?

    1. Hire us to grow your ecommerce store

    We’ve generated millions for our clients, using the methods we’ve developed over years with a singular focus on Google Ads for ecommerce. To discover how we can help grow your business:

    Claim your FREE website strategy session with one of our renowned experts.

    2. Learn & develop your ecommerce skills

    Watch our highly regarded YouTube channel, followed by over 23,000 store owners and ecommerce learners from around the world.

    You can also subscribe to our weekly email newsletter to get real-world tested growth and optimization strategies, as well as notifications on anything you may need to know as an ecommerce store owner.

    Browse our blog, written and structured to be the best resource in the world for anyone starting and growing their online store. It includes strategy guides, setup instructions, checklists, and tools.

    Explore our KeyCompendium, which is a comprehensive wiki of digital marketing terms. Many readers have commented on the usefulness of this content.

    3. Join our team

    If you want to join our team—or discover why our team members love working with KeyCommerce—then see our “Careers” page.

    4. Contact us

    We help ecommerce store owners around the world, so get in touch!