If you’re a Google Analytics 4 user who maintains your tags with Google Tag Manager, you can unlock additional insights by creating recommended and custom events. Events in Google Analytics allow you to measure specific interactions or occurrences on your website or app, such as page loads, link clicks, purchases, or system behavior like app crashes or impression serving.
Table of Contents
Types of Events
Google Analytics 4 events can be categorized into two types: automatically collected events and events that require manual setup.
Automatically Collected Events
Automatically collected events are events that Google Analytics collects by default when you set up the Google tag or the Tag Manager snippet on your website or the Google Analytics for Firebase SDK in your app. These events provide basic data on user interactions and system behavior. Examples of automatically collected events include page_view, scroll, and session_start.
Enhanced Measurement Events
Enhanced measurement events are events that Google Analytics collects from websites when enhanced measurement is enabled within Google Analytics. Enhanced measurement automatically captures interactions like outbound link clicks, site search, video engagement, and file downloads.
Recommended events are events that you implement but have predefined names and parameters. These events unlock existing and future reporting capabilities in Google Analytics 4. You should use recommended events whenever possible to take advantage of the built-in reporting features.
Custom events are events that you define based on your specific needs. It’s important to create custom events only when no other events work for your use case. Custom events don’t show up in most standard GA 4 reports, so you need to set up custom reports or explorations for meaningful analysis. Custom events allow you to measure unique interactions that are not covered by automatically collected or recommended events.
Before You Begin
Before setting up events in Google Analytics 4 using Tag Manager, make sure you have the following:
- Access to the Tag Manager container for the website.
- The Editor (or above) role to the Google Analytics account.
Setting Up Events with Tag Manager
To set up an event using Google Tag Manager, you need to configure a Google Analytics: GA4 Event tag and create a trigger that specifies when you want to send the event. Let’s walk through the steps to set up a custom event for when a user clicks a button to sign up for your newsletter.
Step 1: Create a GA4 Event Tag
- In Google Tag Manager, go to Tags and click on New.
- Enter a name for the GA4 Event tag (e.g., “GA4 Event – Signup newsletter”).
- Select Google Analytics: GA4 Event as the tag type.
- In Configuration Tag, select your Google Analytics: GA4 Configuration tag.
- In Event Name, enter a name for the event (e.g.,
signup_newsletter). This will create a new custom event, and the name will appear in your GA4 reports. If you want to create a recommended event, you can choose one of the predefined event names.
Step 2: Create a Trigger
- Click the Triggering box in your GA4 Event tag.
- Click the + button on the top right to create a new trigger.
- Enter a name for the trigger (e.g., “Trigger – Signup newsletter”).
You can choose the conditions for sending the event. For example, if you want the event to trigger when someone clicks a button, you can set the trigger condition based on the button label. Here’s an example:
- Click the Trigger Configuration box in your trigger.
- Choose All Elements.
- Click Some Clicks.
- Set the trigger condition to “Click Text contains Sign up for the newsletter”.
- Save all your changes.
Alternatively, if you want the event to trigger when someone views a page (e.g., on a confirmation page), you could use a Page View trigger instead.
Step 3: Preview Your Changes
Before publishing your new event in Tag Manager, click Preview to see the data that’s recorded when you click the “Sign up for the newsletter” button. Preview mode allows you to test changes to your container before publishing them to your website. To learn more about preview mode, check out this article.
Viewing Your Events in Analytics
Once you’ve set up your events, you can view them and their parameters using the Realtime and DebugView reports in Google Analytics.
The Realtime report shows you the events users trigger on your website as they happen. You can see the event names, parameters, and other relevant information in real-time. This report provides immediate insights into user interactions, allowing you to monitor the effectiveness of your event tracking.
The DebugView report is a powerful tool for troubleshooting and validating your event implementation. It requires some additional configuration before you can use the report effectively. DebugView allows you to see the events being sent to Google Analytics in real-time, helping you identify any issues or discrepancies in your event tracking setup.
Congratulations! You’ve successfully set up Google Analytics 4 events with Tag Manager. Now, you can start leveraging the power of events to gain deeper insights into user behavior on your website or app. Use the data collected from events to optimize your digital marketing strategies and make data-driven decisions. If you need further assistance with Google Analytics or event tracking, consider reaching out to a reputable digital marketing company or SEO company that specializes in analytics and measurement.
Remember, event tracking is an ongoing process. Continuously evaluate your events and explore new ways to measure user interactions and system behavior. By refining your event tracking strategy, you can unlock valuable insights that will help you drive meaningful results for your business.
So, go ahead and start implementing events in Google Analytics 4 using Tag Manager. Happy tracking!