Tags can be tricky and simple at the same time. The concept behind the Universal Analytics (UA) event tags are simple. Three values are given to the team and based on where they want the tag to fire, a trigger is created. For Google Analytics 4 (GA4) event tags, the configuration tag should be fired on every page where you want to collect data for a GA4 property, and should be triggered to fire as soon as possible (before any other GA4 event tags). From there, the parameters can be set and they need to remain consistent across all events on a page. The main takeaway here is that GA4 event tags inherit the parameters of the GA4 configuration tag. Triggers can be custom events, button clicks, or just a page view. However, if even one minute detail is not covered then it can be the difference between the tag firing at the beginning of a campaign or having a live site without any tracking. The next three points will talk about what I believe are must-haves in order for an event tag to fire correctly.
Datalayer push is enabled on the site
When an event tag is created and that tag triggers upon a dataLayer event, it is looking for the information that is present in the tag to be on the site. From my experience, a problem that frequently occurs is that the website does not have the datalayer push enabled, and when it is not enabled the tag is not being fired as expected because it cannot find the necessary information to track. Once the datalayer is configured as it needs to be, the tag will automatically fire and begin tracking as needed. Below is a screenshot of an event tag firing and how the datalayer push reads the tag due to the trigger set on the tag.
Knowing what information is needed for proper configuration of an event tag
When configuring an event tag, it is critical to have all the necessary information to have the event tag fire correctly, as well as collect the proper information in the process. Having the event category, event action, and event label will ensure that the tag fires correctly as needed. The event category is assigned to the group of similar events that are tracked. The event action is the type of event you want to track. The event label is where the user’s interaction is being tracked. Once this information is available, as well as the above step is implemented, the event tag would fire. Now with GA4, the setup is different as event category, action, and label is not used. Instead, there is a configuration tag that will be used as the base and when a GA4 event tag needs to be created, the user can add parameters that will remain consistent across all event pages.
Testing and troubleshooting
After the above steps are completed, it is important to make sure that the event tag is firing, as well as the data is being collected. The three most useful tools are omnibug and real-time tracking in Google Analytics (GA). Omnibug is a tool that quickly and easily verifies that tracking is implemented properly. It checks for a pattern; if a match occurs, the URL is displayed in a developer tools panel and decoded to show the details of the request (shown above). The real-time GA would show which event category, action, and label is being recorded in real time, hence the name. The tool should be used ideally for GA4 tag testing to have the most accurate real-time data. The DebugView report shows you data (from events, event parameters, and user properties) as Analytics collects the data. The report can help you set up data collection, troubleshoot issues as issues arise, and understand a user’s behavior as the user explores your website or app. I would also like to add that another tool called Tag Assistant would be useful as well. Tag Assistant lets you know whether or not the tag is firing at all, and if it’s not then some more troubleshooting would be needed.
The three points listed above should help you understand the fundamentals of event tags and what is needed to properly configure and implement them. If you have any more questions, please feel free to visit the InfoTrust website and navigate to the Talk to Us section for further assistance.