About Google Tag Manager

Google Tag Manager (GTM) is a system that allows you to collect data from your user’s interactions from one centralized container. GTM collects data in a datalayer and distributes it to any tracking system you want to send data to several tools like Google Analytics, Google Ads Conversion or Facebook advertising.

Let’s walk through the way GTM works step-by-step.

Send data to different tools, from one centralized system

Google Tag Manager is a Tag Management System (TMS). It works similarly to a Content Management System. As the name shows, it is a system to manage tags. Which means, that instead of implementing every tool individually in the source code of the page, you only have to include the one for the TMS. This makes it a lot easier for developers or website managers to organise and it will increase the loading speed / performance of the website. There are some additional benefits to the use of a TMS like Google Tag Manager:

  1. You have a centralized place to see what tracking code is running on your website
  2. It is easier to manage cookie consent for GDPR
  3. You can re-use many things instead of starting from scratch for each tracking code
  4. You can disable / enable tracking codes from one centralized place

Tag Management

Structure your data in a datalayer

The data you send to all these third parties, through a tracking code, need to be fueled with data. By sending data to the TMS, you can map the data to many different tracking codes. The data is collected in something we call a datalayer. This is a semantic translation of everything that’s showing on the page a user visits or element they interact with. A few simple examples of variables in the datalayer are:

  • page_title
  • page_type
  • product_name
  • click_text

There are some great benefits to using a datalayer:

  1. Instead of collecting data for each individual tracking code, you only have to collect it once for the TMS and distribute it from there to multiple tracking codes. This saves a lot of development time
  2. In addition to development time, it also ensures you have only one definition for a variable, that you can use in multiple tracking codes
  3. By only collecting the data once, you save a lot of code. This means higher performance
  4. You manage all the data and variables in the TMS. This allows you to easily document and create an overview of the data you collect and where you send it

In Google Tag Manager you can define variables in the datalayer by using many different techniques. The best technique depends on the data you wish to collect. Generally speaking, variables that are returning a unique value per page, group of pages or related to a user, will be collected through the datalayer that is included in the source code of the page. This is what we do with the PRO plugin as well. The code we include will look something like this:

dataLayer.push({
   "pageTitle":"About Google Tag Manager - Analytics for Joomla",
   "pagePostType":"page",
   "pagePostType2":"single-page",
   "pagePostAuthor":"admin"
});

The plugin will automatically include many different variables in the datalayer, which you can use in Google Tag Manager to send to your tracking codes like Google Analytics or Facebook Advertising pixel. For a full list of variables in our plugin, please check out our documentation.

How is Google Tag Manager different from other Tag Management Systems?

The main reason for users to choose Google Tag Manager over other Tag Management Systems is price. It’s free! There is a paid version as well, but most users will not need the additional features of the paid version. In addition to the zero-cost purchase, GTM is also widely used and many experts blog about it. This means it’s easy to find support and keep up-to-date with new developments.

The final reason to select GTM is that it’s a solution by Google. They make it easy to integrate with other Google solutions and the interface is similar to that of other Google tools. This means a lot of users have an easy toime navigating GTM intuitively.