How to create Google Analytics 4 events with Google Tag Manager

Create GA4 events with GTM

Google Analytics 4 (GA4) events work quite differently when compared to Universal Analytics. Find out how to create one with Google Tag Manager (GTM) to take advantage of this essential feature to track specific interactions on your site.

Define your event

First of all, a quick advice: before creating your event for Google Analytics 4 directly in GTM, think about its name and its parameters (optional).

We advise you to take note of all those details in a document (an implementation plan, for example) to facilitate the creation of everything in Google Tag Manager.

Choose an event name

The nomenclature you decide to choose for your event depends on your preferences, but we recommend choosing names that are consistent (in terms of structure), descriptive (can you understand what it's about just from the name?), relatively short and punctuated with "_" instead of spaces or dashes.

Here is an example: form_submitions for form submissions.

What type of events to use?

Keep in mind that Google offers recommended events and suggests (for reasons that remain unclear) to use them if what you want to measure is similar to a proposed template.

So, decide whether you are going to use a predefined model or create your own event from scratch.

Think about your event parameters

As for parameters, that additional information you can pass when sending an event to GA4, you should :

  • think about whether you need them for your event (it all depends on the segmentation information you want to get in connection with it)
  • think about how to structure them (depending on the information you want to collect, you may or may not have to use several)
  • decide how to name them (here again, think of a logical and descriptive nomenclature, for example, form_name for the name of the form sent)
  • think about how to get the data you want to collect.

Make sure you have a configuration tag for Google Analytics 4

You are close to the goal! Before moving on to the event creation in Google Tag Manager, make sure that the container where you are going to add the event uses a configuration tag for Google Analytics 4. You normally created this when you installed your GA4 property through GTM.

As when you create an event for Universal Analytics, you need to reference either a tracking code (belonging to the targeted Google Analytics property) or a variable / configuration tag in the tag of this type. This allows you to send the data in question to the right property, with the settings you want.

Create your Google Tag Manager for Google Analytics 4 event

Here we go! Now it's time to create the tag and set it up.

Go to your account / Google Tag Manager container, then to the Tags section. Create a new tag, name it, assign it to a folder (this is optional), then choose the tag type Google Analytics: GA4 event.

Then select your Google Analytics 4 configuration tag created for the property you want to send data to.

Add the event name of your choice. Then, if you want to include a property(ies), open the Event Settings section, click on "Add Row" and in the left column, enter the name(s) of your property(ies) and in the right column the value(s) associated with it.

You can also set up user properties.

All you have to do is add a trigger as you normally do.

Test and publish

Before publishing your event, we always recommend to test if your settings work. Click on "Preview" in the menu at the top right and test on a page of your site.

If everything works as expected, publish your changes. Note that we recommend that you make all the changes you plan to make before you do so.

Create your custom dimensions or statistics in GA4

In order to be able to use the data obtained from the Google Analytics 4 event parameters you just created with GTM, don't forget that you need to create custom dimensions for each of them.

This is the last step!

go to the top arrow