Search the site:

Copyright 2010 - 2024 @ DevriX - All rights reserved.

How to Implement Google Site-Wide Tagging on Your Website

How to Implement Google Site-Wide Tagging on Your Website

Tracking conversion has always been an essential part of marketing. Modern technology makes this process comprehensible and accessible to large and small businesses alike.

Times, however, are changing and so is the way we measure performance and track conversions. Now that the future of third-party cookies has been decided, tracking customer behaviors through first-party data is becoming a necessity if you are to retain visibility on your conversions.

This can be accomplished by deploying a specific tag on all the pages of your online property. The tag is a piece of code that generates cookies when users perform an action on your website. These fragments of information are stored in the same domain as your website and, as you and the user are the only sides involved in the interaction, are considered first-party data.

The site-wide tag can be manually installed on your pages by a developer, or it can be automatically incorporated via a tool such as Google Tag Manager.

But before we dive into the specifics, let’s talk some more about why implementing a site-wide tag is imperative for your business.

The Key to the Cookieless World

Marketing strategies are constantly evolving and are in sync with consumer behaviors, technological advancements, and economic changes. To be able to validate which streamlines deliver the strongest results and which are failing, marketers need to be able to closely monitor campaign performance and track conversions.

Moreover, accurately measured data is the basis of attribution modeling, which enables you to finetune your strategy and optimize your marketing channels.

As third-party cookies are on a path to becoming a thing of the past, Google is working on developing alternatives. The conversion measurement efficiency of the new technologies within the company’s Privacy Sandbox is still being tested. There is abounding uncertainty about the exact way information will be organized and handled to ensure both user privacy and tracking accuracy. However, every time the topic of conversion measurement is mentioned, Google strongly advises website owners to implement site-wide tagging asap.

Site-wide tagging enables marketers to generate first-party data and track conversions. It gives them insight into the progress of campaigns and allows them to monitor user interactions with ads and website content. If the proper tools are not implemented in time – before the new technologies start being tested and the future of user privacy management is determined – marketers will start to lose visibility on conversion processes.

As already mentioned, there are two ways to implement site-wide tagging on your website. The manual approach is to add the global site tag on each part of your website. The automated option is to use Google Tag Manager.

Difference Between Google Tag Manager and Global Site Tag

Both tag implementation solutions can be used to successfully apply site-wide tagging. Which one you should choose depends on the tagging and marketing tools you are currently using (if any), your coding skills, and, of course, your business’s needs.

If you are already using Tag Manager, all you have to do to implement site-wide tagging is to create conversion linkers. There is a step-by-step guide on how to do it later in this article.

Global Site Tag

Global Site Tag (or gtag.js) is compatible only with Google products. It is a JavaScript framework you can use to manually add tags to pages, without the need for a tag management system. The tags are installed directly on your pages and can be operated in JavaScript.

Implementing Google site-wide tagging on your website using a global site-wide tag requires a certain level of coding skills and knowledge.

The process is relatively simple and straightforward. However, if you are not comfortable with managing code yourself, it’s probably best to stay on the safe side and ask a developer to do it for you.

Tag Manager

Tag Manager is a tag management system (TMS) that can be used with Google product tags, as well as a broad variety of third-party tags. It’s compatible with web pages, mobile apps, and servers (beta testing). Via the TMS, tags can quickly and easily be managed from a web interface.

Tag Manager features

Although there is initial code installation involved, Tag Manager reduces the time necessary to manually write and edit code. Furthermore, it integrates tags from different non-Google platforms, as well as custom tags, and provides a wider range of tracking opportunities.

In this article, we’ll focus on implementing site-wide tagging on your website via Tag Manager, as it is a more versatile option and a more accessible choice for marketers.

How Does Google Tag Manager Work

Tag Manager can work with Google Ads, Google Analytics, Floodlight, and third-party tags, and renders the manual writing and installation of code redundant in the tagging process.

One of Google’s selling points for Tag Manager is that it “acts as the bridge between marketers and developers”, providing a tag-deployment solution that is reliable, secure, and easy to integrate with other platforms.

When Tag Manager is installed, your website or app will be able to communicate with the Tag Manager servers. You can then use Tag Manager’s web-based user interface to set up tags, establish triggers that cause your tag to fire when certain events occur, and create variables that can be used to simplify and automate your tag configurations.

Creating different variables and triggers allows you to set practically every user interaction with your website as a conversion, and track and measure it accordingly.

The TMS is compatible with Web (desktop and mobile pages), iOS apps, Android apps, and AMP (accelerated mobile pages), and is in beta testing for Servers (for server-side instrumentation and management).

To start implementing site-wide tagging on your website, first, you need to have a Tag Manager account.

Setting Up an Account

Setting up a Tag Manager account is simple.

Add Account tag manager

You open the home page and choose the “Start for free” option. Once you are on the create account page, fill in your company name and country, and set up a Container.

This is the place where all of the data, such as tags, triggers, and variables, associated with a certain account is being stored. This is from where information is streamlined towards marketing tools in order to measure conversions and create attribution models.

A container can work with multiple websites, but if you are focusing on only one, you can name the container after it.

After you choose the platform you’ll be tagging, and click “create”, you’ll have to confirm that you accept the Google Tag Manager Terms of Service Agreement. This finishes the first phase of the account creation process.

Once you’ve set up the account, Tag Manager generates a Container Snippet that needs to be added to your website’s code.

Install Google Tag Manager

The snippet consists of two parts – one that has to be added in the <head> section of the code (preferably as closer to the top of the page as possible), and one that goes into the body, immediately after the opening <body> tag, and is a back-up code in case JavaScript has been disabled.

In order to accurately track conversions, the Tag Manager snippet has to be added to every page of your website. It must be placed directly into the page code, otherwise certain tags might be prevented from working.

If you need to access the snippet again to send it to your dev team or to add it to your website yourself, you can find it by clicking on the top bar here:

Tag Manager set up

You can find information about some advanced settings here.

To follow and monitor the performance of certain ads, events, or actions, first, you have to create tags for them in the Tag Manager, and then add conversion linker tags.

Creating Tags

To create a new tag, choose the platform you are using from the list and set up a tag for it. If you are already using Tag Manager and have created tags for your preferred platforms, you can skip this part of the tutorial and move forward to the next one, describing how to create a conversion linker tag.

You can start creating a new tag from either the “Tag” screen or the “New Tag” field:

add new tag

Then you need to click “Tag Configuration” in order to choose a tag type. Scroll through the menu to find your desired platform and choose it:

Choose Tag Type

There’s a list available with all supported tag platforms. You can check it here. If the marketing tool you are currently using is not listed, don’t worry, you can create custom tags as well.

For a Google Ads conversion tracker tag, for example, you have to take the necessary information from your Google Ads account.

Tag Configuration

The information you need, however, varies for every tool and you’ll need to check your respective accounts.

The next step is to choose a trigger to make the tag fire.

Tag Configuration - Triggering

The default setting is “All Pages”, but you can choose other options from the plus icon in the top right corner of the window:

Choose Trigger

After you click the plus icon, choose “Trigger Configuration” and browse to options to find one of your that suits your needs:

Choose Trigger Type

The final step is to name your tag and save it. Once you’re done with the initial tag, it’s time to do the most important part and set up the conversion linker tag.

Creating Conversion Linker Tags

Conversion linker tags make sure your other tags have access to website action information such as clicking ads, links, buttons, etc. This ensures that the data flowing to your other tools is measured properly, and provides accurate information for conversion tracking.

Setting up the conversion linker tag follows the same steps we covered in the previous section, but this time from the tag configuration menu you have to choose the “Conversion linker tag” option:

Conversion Linker

Next, in the triggering setting options, choose that the tag fires on all pages. Name your tag, click safe and you are good to go:

Conversion Linker-1

Now that the conversion linker tag is set to fire on all your pages, you can publish it from the “Submit” button in the top right corner of the window:

Submit

Submit Changes

User Consent and Privacy

Whenever managing personal data, you should always be very careful and take into consideration the legal rights of users. This goes especially to residents of the European Economic Area (EEA).

When using any products to create and store cookies, you are obligated by law to ask for the user’s consent and provide disclosure. The user should also be informed of all personal information that will be gathered, how it is going to be managed and secured, and to what end it will be used.

The EU user consent policy and legal obligations policies applicable to Google products can be reviewed here.

Recap

Retaining the ability to track user interactions within a website and measure conversions is imperative for a business’s digital marketing strategy.

With the future of third-party cookie alternatives yet uncertain, first-party data stands out as the most reliable way to stay on top of changes. Integrating site-wide tagging on a website will enable marketers to continue to have visibility over the page content and channel performance.