Categories

CTM Blog

Analytics

The New Google Analytics: How to Set Up Events in GA4

by Chris Todd

Just when you thought you’d mastered how to set up events in Google Analytics, Google announces that Universal Analytics is going away after a long, successful run, and now it’s a whole new ballgame in GA4. The good news is Google Analytics 4 (GA4) is set up specifically to make events more useful than ever before. They’re the backbone of the new platform. With their new found importance, and flexibility, it’s crucial to learn how to set up events in GA4 in a strategic way.

Events in Google Analytics 4

In case you’re wondering if events in GA4 are really that different from the events we’ve been used to for the past 10+ years, our internal team has been referring to it not as an “apples to oranges comparison,” but an “apples to football” comparison. What used to be one specific tracking tool with event category, event action, and event label has become much more robust. From Google’s help documentation, every interaction tracked by GA4 is considered an event. Every single one. This would be overwhelming to set up events to track everything from page views to eCommerce transactions, and luckily Google agreed and GA4 comes ready to track a ton of event types automatically.

Setting up Automatic Events in GA4

There are over 40 automatic events to help monitor the engagement across your websites and apps in GA4. There’s no need to worry about setting up specific event tracking for things like page views, file downloads, clicks to external sites, and even form submissions.

The only step required to begin tracking these events is to install the base tag for GA4. If your data stream is pulling in data, you’ve got some events to start analyzing. There’s also a quick toggle to switch on for enhanced event measurement.

This is where GA4 provides its first taste of customization. You can turn on, or off, specific enhanced measurements to suit your needs by clicking on the settings cog to view individual events. It’s likely you’ll want to keep all of these on, but the flexibility to turn some off is a nice feature. We don’t have form events turned on, in favor of more personalized events we already have set up from our Universal Analytics properties. Need to set up your own custom events? 

Setting up Custom Events in GA4

Custom events are where marketing and analytics strategists get to shine in GA4. This is your opportunity to put your spin on your site and app measurement strategy. What really matters to your team? 

Here’s what you’ll need to create an event in GA4: 

  1. Event name – This is the description you’ll see in your reporting. Make it clear what you’re tracking and short enough to see in any chart format. The automatic events all follow the naming convention of lower case words, connected by an underscore as necessary (xxxxx_yyyyy). When creating your own events, it probably makes sense to follow suit. 
  2. Parameters – Up to 25 parameters to attach to your event. These are similar to the event category, label, and action of old. But now you get to connect a lot more context to your events for more flexible slicing and dicing of your data.

To create your event within GA4, navigate to “Configure” in the left hand navigation, then “Events”, and finally click on the “Create Event” button. Enter your chosen event_name, and then start adding parameters you’d like to associate with your event.

In this mode, creating custom events will use existing parameters to build new events that matter to your team. Something like, when event_name = page_view and page_title contains /pricing, you want to trigger a new event_name = begin_shopping. You can create your own, brand new event, or use Google’s recommended events as a starting point for tracking common activities like logins or purchases. 

Quick Tip: In order for custom events and parameters to appear in reporting, beyond real-time reports, you’ll need to add an additional custom dimension or metric in GA4.

What if you want to create an event using parameters that don’t exist yet? More good news from the flexibility-loving people at GA4; you can create those too. 

Establishing a Parameter Strategy

Google Analytics 4 is a blank slate. That makes it a little more difficult to get up and running, of course, but it also gives you the freedom to rethink your measurement strategy and get quality insights from your GA4 data stream. 

You get to add 25 parameters to the events you create in GA4. That’s a lot. It can be a little overwhelming, honestly. But with the recommended events noted above, GA4 documentation provides a few suggestions–and requirements. For example, if you want to set up an event on an eCommerce site for every time a user adds a product to their cart, you could start with these parameters:

Google Tag Manager item parameter names, including for setting up eCommerce events in GA4

If there are required parameters, like item_id for add_to_cart events, obviously you need to include those. All events also get the following parameters assigned automatically: 

  • language
  • page_location
  • page_referrer
  • page_title
  • screen_resolution

Outside of those parameters is where you get to have fun, and get to be strategic. Tailor your parameter approach to what matters on your site, to you, and to your leadership team or clients. Try to ask yourself:

“What questions am I often asked about this event?”

What page, when, and how many are already answered. But, if you have multiple products on one page you might want to add a product name to the event. If your event generates revenue, there might be a value you should send. For an example event ,to track which CTAs are getting clicked on your site, you might go with:

With no custom parameters, you’d be able to answer how many clicks there were on your site, and which pages were driving the most clicks. But with these additional parameters, now you can track specific links, like say a “Book a Demo” CTA on your site versus “Learn More.” Or, start A/B testing which CTA colors work best. 

Unfortunately, if your parameters don’t already exist in GA4, there’s no way to build your event in GA4. And if your parameter values are dynamic (change from event to event) you’ll likely need to use another tool to trigger your events anyway. Unless of course you or a close friend on your development team enjoy coding parameters like this directly in your site’s code:

Sample code for setting up event parameters in GA4 directly on your site.

Setting up GA4 Events in Google Tag Manager

The most popular tool to make setting up events in GA4 a breeze is Google Tag Manager (GTM). All the pieces will be the same, but you’ll be able to send your events to GA4 without manually adding new code to your pages. 

Screenshot of Google Tag Manager to select Google Analytics GA4 Event tag type

In GTM, you’ll need to set up a “tag” for each custom event you’d like to track, a trigger to determine when to send that event, and any variables necessary to populate your parameters. After selecting the GA4 Event tag type, we’ll follow with our same example of setting up CTA click tracking across our site:

Google Tag Managaer GA4 tag configuration screenshot. Included sample event name, cta_click and three sample parameters

This tag will send our “cta_click” event along with the three defined parameters. GTM has built-in variables which would be used to dynamically populate parameter values like {{Click Text}} and {{Click URL}}. If you have something custom like {{Click Color}} you’ll need to add a user-defined variable to pull that information based on existing code on your site–or with a little help from your development friends.

Then, once the tag is set, you need a “trigger” to determine when to send the event. You can choose between page views, clicks, user engagements, or other custom triggers–all of which can be customized. For our example, we’ll choose clicks as our trigger type, and then tailor it to only fire on CTA buttons on the site, with the assumption here that all our CTAs have a click class containing “cta.” You could also send for all link clicks, and do your filtering and modifications inside GA4 reporting. 

Sample Google Tag Manager trigger configuration screenshot showing just clicks, for only clicks containing 'cta'

Save your tags, trigger, variables, and anything else you’ve updated and hit “submit” to push your code into your site and start populating events in GA4. 

Before you finish up, one of the greatest tools in Google Tag Manager is the preview tool. You can run your preview to test your events to make sure they work as intended. The tool will add parameters to your site visit which will start populating your GA4 debug view (Configure > DebugView) in real-time and display every interaction as it happens so you’ll know you’re set up for success. 

Of course, Google Tag Manager is just one option for sending your events into GA4. You likely use lots of tools from CRMs, to call tracking providers and advertising platforms. The best of these tools will have GA4 integrations to create events relevant to their platform. 

GA4 Events through Integrations and APIs

Every integration will have their own process for setting up events in GA4. The common denominator will be that events are sent using Google’s API. Whether through an integration or through your own team’s use of API documentation, the pieces you’ll need are the same. 

  • Event name
  • Parameters
  • A trigger to decide when to send the event

Using CallTrackingMetrics as an example, we can show how you’d set up call tracking events in GA4. The most common use case is to send all calls generated from your website into Google Analytics so you can connect those offline activities with online site engagement. 

Our internal team wants to capture all sales calls that result in an actual conversation or qualified conversation, i.e., we don’t want to give ourselves credit for spam calls and wrong numbers.

In CTM, the first thing we do is set up the trigger conditions to decide which calls (or other activities like texts, forms, and chats) to send to GA4 as an event. To include only quality conversations, we have it set up based on length of call or call scoring and we’re filtering our customer service calls through automated tags. 

CallTrackingMetrics GA4 integration screenshot for setting your event conditions

The next step is to create a mapping set. This will look familiar to how we set up events in Google Tag Manager, but now we can use additional context provided by CallTrackingMetrics as parameters. 

CallTrackingMetrics GA4 integration for tracking calls in GA4 through a parameter mapping set including activiy type and source

Our call tracking event in GA4 will have the name sales_call, and will come associated with a unique ID of the conversation, what kind of conversation it was (e.g., inbound call, text, form submission), and the attribution source of the conversation. 

Just like setting up parameters in GA4, you’ll want to think through what adds the most value for your reporting. You might want to send activities that resulted in a sale separately from the original engagement, and include parameters around revenue, product type sold, and other ecommerce measurements. Or perhaps you need to be able to segment first-time callers with returning customers in your GA4 reporting. With the flexibility of both GA4 and CallTrackingMetrics you’re able to get the data you need in a way that’s insightful and valuable. 

To Wrap Things Up

Google Analytics 4 is designed to put more control in the hands of marketers and analysts. With its blank slate and flexible approach to setting up events, it can be both freeing and frustrating at the same time. Whether you’re looking to track calls in GA4 or get a handle on eCommerce purchases, setting up events requires three parts: a name, parameters, and a trigger. Within those three parts, there is plenty of opportunity to be strategic and adjust your legacy measurement approach set during the reign of Universal Analytics. Don’t settle for a rehashing of event category, label and action. Use this as an opportunity to set up meaningful events in GA4 with more context than ever before.
Book a demo with our team to continue exploring how call tracking and GA4 work together to give you a full picture of the activity on your site, and the engagements it’s creating offline. Or keep the education going with more great call tracking with Google resources.