Coordination is Key

August, 2024

Google Analytics 4 (GA4) introduced superior flexibility and tracking compared to Universal Analytics. Specifically, its event-based tracking model allows for granular event tracking with custom parameters using Google Tag Manager (GTM).  This means that you can track very specific user interactions with associated details providing insights into how visitors are using and experiencing your website.

However, there is an increased reliance on sending certain events and variables to the data layer to allow for this expanded tracking. Which means that your measurement capabilities will be as robust as what is programmatically provided to you in the data later. Since the resulting value in the data layer is the work of a developer, it is imperative that you work closely with your development team, as part of website build planning, to get this right. 

In a typical scenario, the analyst begins setting up tags and triggers and then realizes that they are missing key data. The analyst sends a note to the developer saying something along the lines of, “can you send a unique event to the data layer when a user submits a form? Currently it is just coming over as a click event, but I need to track the submit event in GA.” The typical developer quietly moans, because they hate working with GTM/GA4 stuff. Next they go to GA4 developer documentation because that is what you mentioned, not GTM which is where this magic needs to happen.

Why does this happen over and over again? The reason is  GTM/data layer variable planning was not done as a formal step in the requirements process.  Frankly, it should be treated as any other critical development requirement with all involved parties coordinating on the effort for it to be successful and not an afterthought burden for the development team.

 

Getting It Right

Identify What You Want to Track & Report; Your KPIs

Identify each event, each interaction, that is part of the user journey events that you wish to track, analyze and report on.  Identify any data elements that you want captured as part of this tracking.

As an example, we want to understand how many users are interacting with this slider.

This means we want to be able to track the following:

  • Each click on the forward and back arrows (event)
  • The slide viewed associated with that event (variable)
  • When the learn more button is clicked (event)
  • The slide that is was clicked on (variable)

You will want to identify these “requirements” for each interaction and event you wish to track across your site.

Document Tags, Triggers and Variables

Above, we identified what we want to track, now we need to specifically identify the data we would like to see for this tracking.

Event: slide change
Parameters:

  • Type of arrow (forward or backward)
  • Slide exposed upon slide change

Event:  Learn More Click
Parameter: 

  • Slide where the button was clicked

Your website developers need to understand what you want in the data layer in order for you to track this. You may hear your developer ask what you would like in the payload. This just means, what pieces of data are you looking for and how do you want them labeled.

Not all tracking will require data layer variables, but by doing this planning, you will uncover what does. For instance, in the above example, you really do not need anything in the data layer related to the slide where the Learn More button was clicked. You can just use the click URL which is a standard variable in GA4.

Development Coordination

We recommend organizing your requirements in a spreadsheet that would include the following:

  • Event
  • Where that event occurs
  • What you wish that event to be called
  • Parameters that should accompany the event
  • What you want those parameters to be called

An example of what this may look like in the data layer is shown below. These are the variables that are sent to the data layer throughout a checkout process. The developer was asked to name them DLV - name of thing so they can be easily referenced when creating tags in Google Tag Manager.

Once you have documented all of these, meet with your developer to review. Prior to that meeting, if they are unfamiliar with GTM and the data layer, send them this link to the GTM Developer Documentation.

Conclusion

Planning for your tracking and analytics needs is as important as any other function requirements. Without identifying and planning for tracking KPIs across your digital landscape, how will you be able to see what is working and what needs to be optimized? These insights should be considered key deliverables that are reported on and monitored regularly. 

Key Points
  • GA4 offers rich opportunity for event tracking
  • Planning should be part of the requirements phase of web dev
  • Involve the development team from the outset
  • Document your needs in detail