The Google Analytics 4 era is upon us, and to do GA4 right you're likely going to need Google Tag Manager.

There are more ways than GTM to GA4, but they work together pretty seamlessly. And GTM reduces the need for a developer, which is one reason I like it (I always feel bad asking a talented programmer to copy-paste this event code snippet just because I can't access the code base).

Google's vision for the GA4 era seems to be:

  • GTM is the implementation layer
  • GA4 is the intelligence/analysis layer
  • Data Studio is the reporting layer.

The simplest way to think about GTM is as an extension of your site's code.

To make events and interactions "visible" to GTM, the information has to exist in the data layer.

A data layer is a JavaScript object that is used to pass information from your website to your Tag Manager container. You can then use that information to populate variables and activate triggers in your tag configurations.

With Tag Manager, there are now two code bases for your site (or app):

  • The functional code - what your developers created to make the whole experience happen
  • The marketing code - all the stuff we can do in GTM that isn't part of the user's core experience but facilitates most modern web work (social media pixels, Google Tags, event tracking, cookie banners, A/B testing tools, etc.)

GTM is a container for all that code that powers your digital marketing and analytics efforts but doesn't need to be in the core code base (there are some things that need to be added directly despite not being core to the user experience (like A/B testing tools) to avoid creating a bad user experience due to the way GTM handles code injection).

An added layer of data for your marketing and analytics needs.

What happens when I change something?

Edits in Tag Manager are not destructive to historical data. They change how things are handled moving forward (and may cause you headaches if you rename things and forget when you go to do time period comparisons).

An example question I was asked recently:

I am adjusting various triggers based on some new website updates. Will this effectively "erase" the event count of previous tags with the old triggers?

Short answer: nope!

Once an event hits GA4, GTM no longer holds sway over it, it just packages the information that gets sent and processed.

In this example, changing the trigger allows you to adapt/update the event criteria so you can send the same event name into GA4 even if the trigger changes.

How to think about Google Tag Manager:

Tag Manager is a supplementary code base where you can move (most) of your marketing, analytics, and related code to keep your core code base lightweight while giving you, the marketer, more flexibility and control over how your events and code snippets are implemented.

Need a new Meta Pixel event firing for better optimization? It's now just a few clicks away, no developer required.

GTM is an extension of the site code.
GA4 is a destination data is sent to.