Wed, December 9, 2020
When reading the title of this article, some of you might think: “Oh, it’s just another guy telling me to flip the switch and the event becomes a key one.” If that’s the case, I recommend reading this article to the end — I’m sure you’ll discover some unexpected ways to mark an event as a key event in Google Analytics 4.
Let’s start with the basics: a key event in Google Analytics 4 — no matter how you create it — is always based on an event.
That’s why in this article, when I refer to ways to create key events, I mostly mean different ways of creating events: from sending them via GTM to creating events directly in the Google Analytics 4 interface.
If you’ve already read similar articles online, feel free to skip the initial sections and jump right to the most interesting parts:
When creating GA4, the Google team made sure that certain events would automatically be tracked as key events. Specifically:
purchase
(web and app)first_open
(app only)in_app_purchase
(app only)app_store_subscription_convert
(app only)app_store_subscription_renew
(app only)Additionally, when you enable ad personalization using a linked Google Ads account, these events are also marked as key events in your GA4 property:
add_to_cart
add_to_wishlist
begin_checkout
session_start
view_item
view_item_list
view_search_results
Simo Ahava has already written a great article on how to send events to Google Analytics 4, so I’ll keep this part short.
The flow is still the same: create a trigger with the required condition and link it to a tag of type Google Analytics: GA4 Event. Here's an example of how such a tag might be configured:
Let’s assume that we want to send a send_form
event to GA4 when a form is successfully submitted.
As you can see, the setup is very straightforward:
In step 1, choose your Google Tag. You can configure it like in the screenshot below:
In step 2, specify the name of the event you want to send. This is exactly how it will appear later in the Google Analytics 4 interface. The recommended format is snake_case
.
In step 3, add the necessary triggers. The topic of triggers is extensive, and your choice will depend on the specific event you're tracking. However, this doesn’t affect the content of the article — it remains relevant for all cases. That’s why I’ve blurred the trigger settings in the screenshots.
If you need help specifically with trigger configuration, check out the following materials from this blog:
Once you’ve set up event sending — it’s time to move to the next stage.
When browsing through the GA4 interface, you’ll notice there are two ways to create a key event:
Both options will produce the same result. The difference lies in the fact that Mark as key event can only be applied to an event that has already been recorded in Google Analytics 4. If it’s a new event, like in our case, it’s better to use the dedicated New key event button.
Just enter the event name exactly as it was defined in GTM. In our case, the setup will look like this:
If everything was done correctly — the event will be marked as a key event. That’s it, the setup is complete.
If you need one key event for all forms on your site, the approach above works well. But what if you need separate key events for different forms?
There are two options:
e.g., send_form_contact_us
for the contact form,
and send_form_callback
for the callback request form.
send_form
, and pass a parameter (like form_name
) that indicates the specific form.Both options are valid. But since option 2 introduces the powerful event parameters feature — let’s focus on that.
Let’s say we have a send_form
event with a form_name
parameter equal to contact_us
.
You can also pass multiple parameters (e.g. form_name
and location
) — it won’t change the logic.
Now head to the GA4 interface and go to Events -> Create event:
In the window that opens, click Create and begin your configuration:
c_contact_us
.I recommend using a different naming format than the original GTM events — for example, prefixing custom GA4 events with c_
(for Custom) so you can distinguish them later.
c_contact_us
, we want to include the send_form
event where the parameter form_name
equals contact_us
.c_contact_us
event to also contain the location
parameter? (You can also modify parameters here — but that’s a topic for another day.)Once you’re done, don’t forget to click Create in the top right corner. Now that we’ve created the new event, we just need to mark it as a key event.
Go to the Key events section, click New key event, and enter the name of your new event: c_contact_us
. That’s it — you’re done.
The methods above won’t be surprising if you’ve worked with analytics systems before. A similar approach has existed in Facebook for some time.
This last method is fundamentally different. Here, the event is not a user action — it’s them joining a specific audience. This is great if you want to define a key event as a sequence of actions that occur across multiple pages.
For example, my blog doesn’t have typical purchase events. But I do have an add_to_cart
event that fires when someone actively views an article for 30 seconds and scrolls at least 50%.
Let’s say I want to consider as a key event any session where this add_to_cart
fires three times.
To do this, I’ll create an audience with that sequence. (Feel free to combine different events here.)
The “secret” setting for creating the event lies in Audience Trigger. Click Create new.
In the Event name field, enter the name of your new event — this is what will fire when the user joins the audience.
Good practice: prefix the event with audience_
so you can distinguish audience-based events from others.
As for the Log an additional event when audience membership refreshes checkbox — here’s how it works:
Another important setting that affects event tracking is Condition scoping — the scope of the action sequence:
If you want the sequence to occur within one session — choose Within the same session. If you’re fine with the user completing the sequence across multiple sessions — choose Across all sessions.
Now give your audience a name, click Save, and of course — create your key event.
Google Analytics 4 gives us much more precise ways to configure key events — and that’s exciting. I hope the audience-based event creation impressed you as much as it did me.
Drop a comment about what issues you’ve run into while working with GA4 — maybe I’ll cover them in the next article.
If you enjoyed this content, subscribe to my LinkedIn page.
I also run a LinkedIn newsletter with fresh analytics updates every two weeks — here’s the link to join.
Web Analyst, Marketer