{"id":4284,"date":"2020-05-21T06:16:11","date_gmt":"2020-05-21T03:16:11","guid":{"rendered":"https:\/\/trackingchef.com\/?p=4284"},"modified":"2023-07-02T12:04:04","modified_gmt":"2023-07-02T09:04:04","slug":"generic-event-tracking-in-google-tag-manager","status":"publish","type":"post","link":"https:\/\/trackingchef.com\/google-analytics\/generic-event-tracking-in-google-tag-manager\/","title":{"rendered":"Generic event tracking in Google Tag Manager"},"content":{"rendered":"\n
\n
UPDATE: <\/strong>This type of event tracking was a great solution for working on Google Analytics Universal. With it’s sunset and migration to GA4, I feel like this solution is now obsolete and don’t recommend using it.<\/p>\n<\/blockquote>\n\n\n\n
When working with a client to implement a measurement plan in Google Tag Manager (GTM), I often need to set up multiple events to capture different user interactions.<\/p>\n\n\n\n
These can range from SaaS (e.g. Sign up) or user engagement (e.g. Form Submissions). For ecommerce events, I usually choose to stick o the standard naming convention and data layer schema.<\/p>\n\n\n\n
To simplify the setup, I usually create a generic set of a Custom Event and Data Layer Variables that can be reused across any event I want to track. This also enables me to add additional events down the line without altering the current GTM setup.<\/p>\n\n\n\n
Let’s break it down<\/h2>\n\n\n\n
Custom event<\/h3>\n\n\n\n
The first step is creating a Custom Event that will be used as a Trigger. I like to name this event ‘ga_event’ as I mostly use it for Google Analytics events, but it can be named anything you like. The important thing is to be consistent in its naming across whichever events you trigger.<\/p>\n\n\n\n
To create the trigger, navigate to the Triggers page in GTM and click “New.<\/p>\n\n\n\n
Select the trigger type ‘Custom Event’ and set the Event name to ‘ga_event’. The trigger should fire on all custom events.<\/p>\n\n\n\n