Step by Step: Setting up a GA4 Event Tag in GTM

In my last post, I showed you how to set up the Google Analytics: GA4 Configuration tag in GTM. In this post, I’ll show you how to set up the next piece of the puzzle, the Google Analytics: GA4 Event tag. You’ll use this tag to set up all of your recommended and custom events that don’t come out of the box with Enhanced Measurement (more info on that here).

Step 1: Select “Google Analytics: GA4 Event” from the new tag configuration pane  

After you’ve successfully set up your “Google Analytics: GA4 Configuration” tag (see this post for step by step directions), the next thing to do is to set up your first “Google Analytics: GA4 Event” tag. To do so, select “New Tag” and choose from a couple of new tag types you’ll now notice in the slide out window. In this case, we’ll select the “Google Analytics: GA4 Event” tag. 

Step 2: Configure the Google Analytics: GA4 Event tag

To start configuring an event tag for the GA4 property, you should first have an idea of what you want to track. In my case, this tag is for my personal blog, and on my site, I have a newsletter signup box where you can subscribe to get notifications by email 1x/week if there are new posts. I’d like to set up a tag to track when someone has successfully submitted their email to subscribe (I’ve shown other fun stuff for this newsletter box before, such as tracking the element visibility of the newsletter subscribe box). 

Once I know what to track, I’ll start to configure the tag. The first thing the event tag will ask for is which configuration tag to reference. It will show all config tags you have made in the drop down, as well as give you an option to create a new one. 

In this case, I’ll chose to reference my “GA4 Config” tag since that is the one I’d like to send event data to. I’ll then choose an event name. 

Choosing an event name and associated parameters is a whole topic in and of itself, and I’ll be writing a more detailed blog post on this later, but suffice it to say, it’s important to take note here. The first thing you should do is check if the event you want to track is called out as a recommended event in the GA help docs. If it is, use the nomenclature that is recommended. This is really important because just as in GA for Firebase, if you use recommended events, GA has said you will unlock specific reporting in the GA reporting UI for these suggested events. It’s important to note that to date we have not seen much specific reporting available for recommended events, but it may come. If instead you use a custom event, this reporting will not be available out of the box, and will instead require use of Analysis or Big Query. So… use the recommended events when you can, it will (supposedly) make your life (or that of your analyst) easier! 

In this case, there is a recommended event called ‘sign_up’ which will do for what I want to track here. I’ll input that as the event name, and then click on ‘Event Parameters’ to add more detail there. 

For parameters, I’d like to know what page someone was on when they subscribed, as this is important info I can use later on to optimize the user experience and try to encourage more signups. The suggested event didn’t have specifics about these parameters, so I’ll make my own here. I’ll use “subscribe_location” as my parameter with a value of the {{Page Path}} variable.

Step 3: Add your Trigger to fire the tag

In this case, I want my tag to fire when someone hits the ‘Subscribe!’ button and successfully subscribes to my newsletter. Based on previous work, I already have this trigger created as a custom event tracking ‘form-signup’, so it’s the one I’ll use.

Once I’m happy with the tag and trigger setup, I’ll hit save.

Step 4: Preview and debug the new tag

(note: in the following screenshots, the tag is named GA W+A rather than GA4 but it is the same)

Now that I’ve got my new tag setup, I want to ensure it’s firing properly. To do that, I’ll go into preview mode in Google Tag Manager and flip over to my blog to test out the subscribe functionality. I’ve set up the trigger to only fire on successful submission, so I’ll have to actually submit an email to be added to the newsletter list here. In this case, I’ll just use ‘test@testing’com’

Once I click on the subscribe button, I’ll watch GTM debug mode to see if my tag fired properly. There it is!

Now I’ll click in to see if my parameter values are also being captured correctly:

Looks great! I can see the event name of ‘sign_up’ and the event parameter of ‘subscribe_location’ with value of ‘/’ indicating the test was done on the homepage are there as expected. Looks like my new tag is good to go!

Step 5: Publish

Once I’m thoroughly satisfied that my new tag is functioning as intended, it’s time to sing like no one is listening (aka the GTM slogan that shows on screen while the tag is publishing, iykyk 😉 ) 

That’s it! My first Google Analytics 4 event tag has been launched.

Leave a Reply

6 Comments

  1. Hi Krista.
    I’ve been struggling with App+Web properties for a while.
    For example, if you create the new property on Google Analytics, then you won’t be able to connect your Firebase App with it. Every time I tried to connect a Firebase App to the App+Web property, GA created a new Project in Firebase instead.
    I haven’t been able to upgrade a Firebase App to be compatible with the App+Web properties, because I’m not Owner of any Firebase Project. So I’m not sure if that works and how.
    In the meantime, The new App+Web reports are cool and stuff but haven’t been able to see it in action with a real app on it.
    ¿Do you have some information about this?
    Best regards

    • Krista

      Hi Daniel,

      Correct, you can’t connect after the fact (for now, at least), and yes, you do have to be an owner on the Firebase project. I suggest starting the creation in Firebase, and creating the A+W property there, so you’ll then be able to take advantage of it for tracking in both app & on web. Hope that helps?

      Best,
      Krista

  2. Jon Whitehead

    great write up Krista! I setup an event called purchase (which should be a web suggested event) The web and app event tag is firing correctly on the site when looking at preview in GTM, but the event is not showing up in GA web&app property – is there something else I need to setup in the GA property?

    • Krista

      Hi Jon,

      Because it is a custom event, the only way you’ll be able to see it for now is in the BigQuery export or in Streamview analysis. Custom events do not show up in regular reporting (hence the encouragement to use suggested events – and yes, I agree and expect to see something along these lines soon).

      Best,
      Krista

      • Naren

        Hi Krista,

        For a custom event, if we were to add it as a conversion event, would it then appear for regular reporting?

        • Krista

          If you mark it as a conversion event, it will show up in the conversion event table for reporting along with the regular events table.

Next ArticleAnalyzing Reports in the new App + Web Property