In Universal Analytics, events existed, but only as a type of hit, which was a subset of sessions, which was a subset of users. Basically, UA records a user coming to your site and starting a session, then it records the actions that the user took during that session which are recorded as hits.
Then if you had decided to track anything else that the user did that wasn’t already included as a hit in GA, you could create an event to track it.
Now in GA4, all actions are simply events.
On This Page
What are the types of events in GA4?
Automatically collected events
Basic pre-defined events that most businesses will want to track on their website including:
- First_visit, Session_start and user engagement.
As the name suggests, these events are automatically collected and don’t require any setup in Google Tag Manager.
Enhanced Measurement events
They enable marketers to capture even more web behaviour data without the need for technical help which again means there is no requirement to set these events up in Google Tag Manager. They include:
- Page_view, Scroll, Outbound_link_click, Site_search, Video_Engagement and File_Download
Recommended events
They do require code on your site to pick up the events which can most easily be implemented in Google Tag Manager. But they are slightly different from custom events because Google has already done some of the thinking for you. As you can imagine the list of recommended events includes quite a few but they mainly include:
- purchase, a user completes a purchase, refund and search.
Here is the list of most recommended events:
add_payment_info
A user submits their payment information. Parameters: coupon, currency, items, payment_type, value.
add_shipping_info
A user submits their shipping information. Parameters: coupon, currency, items, shipping_tier, value.
add_to_cart
A user adds items to a cart. Parameters: currency, items, value.
add_to_wishlist
A user adds items to a wishlist. Parameters: currency, items, value.
begin_checkout
A user begins the checkout. Parameters: coupon, currency, items, value.
earn_virtual_currency
A user has earned virtual currency (coins, gems, tokens, etc.). Parameters: virtual_currency_name, value.
generate_lead
A user submits a form or request for information. Parameters: value, currency.
join_group
A user joins a group. Parameters: group_id.
level_end
A user completes a level in the game. Parameters: level_name, success.
level_start
A user starts a new level in the game. Parameters: level_name.
level_up
A player levels up in the game. Parameters: character, level.
login
A user logs in. Parameters: method.
post_score
A player posts his or her score. Parameters: level, character, score.
purchase
Items are purchased by a user. Parameters: affiliation, coupon, currency, items, transaction_id, shipping, tax, value.
refund
A refund is issued. Parameters: affiliation, coupon, currency, items, transaction_id, shipping, tax, value.
remove_from_cart
A user removes items from a cart. Parameters: currency, items, value.
search
A user searches your content. Parameters: search_term.
select_content
A user has selected content. Parameters: content_type, item_id.
select_item
An item is selected from a list. Parameters: items, item_list_name, item_list_id.
select_promotion
A user selects a promotion. Parameters: items, promotion_id, promotion_name, creative_name, creative_slot, location_id.
share
A user has shared content. Parameters: content_type, item_id.
sign_up
A user has signed up. Parameters: method.
spend_virtual_currency
A user has spent virtual currency (coins, gems, tokens, etc.). Parameters: item_name, virtual_currency_name, value.
tutorial_begin
A user begins a tutorial. No parameters.
tutorial_complete
A user completes a tutorial. No parameters.
unlock_achievement
A player unlocks an achievement. Parameters: achievement_id.
view_cart
A user views their cart. Parameters: currency, items, value.
view_item
A user views an item. Parameters: currency, items, value.
view_item_list
A user sees a list of items/offerings. Parameters: items, item_list_name, item_list_id.
view_promotion
A promotion is shown to a user. Parameters: items, promotion_id, promotion_name, creative_name, creative_slot, location_id.
NEED HELP?
Our dedicated support team is just one call away. We're here to guide you through the customization process, ensuring your PromoTron platform is tailored to your exact specifications. The process of customization has never been easier or more accessible. Contact our Support team!
Custom events
This is where the real potential of GA4 comes alive. Custom events are very similar to recommended events, but essentially you can create any data point that you want.
Let’s say you already have scroll being collected as an enhanced measurement, scroll by default is when someone scrolls to 90% of the page. But let’s say you want to have data available on when website visitors scroll 25, 50 and 75% of your page. You would need to set up the event in Google Tag Manager and then receive it in GA4. You can also create custom events without GTM. The most important thing is to use correct parameters etc.
Event parameters
Parameters collect extra information that can be used when we get to analysis. It is important to know that all automatic events already collect a set of standard parameters.
With that said, you can also add custom parameters to automatic and enhanced measurement events. Then you have recommended and custom events, which also have standard parameters but you can obviously add your own custom parameters too.
Lastly on parameters, in order to actually use the information collected in events and parameters you will need to create them as custom dimensions or custom metrics. Otherwise you can see parameters in the Events: Event Name section within the engagement section of reports, but you won’t even see them in the explore section. And the explores is where you will be able to make the most of your custom parameters.
Remember you have to implement at least gtag.js script to <head> section of Order confirmation page. You could also use Google Tag Manager scripts and events. Also be attentive you have to replace 'G-**********' with MEASUREMENT ID of your data stream and the values '{{TRANSACTION_ID}}' etc., should be replace with real values from your backend code of your website or web application. If you used quite the same script in analytics.js syntax, you have to translate this script to gtag.js.
EXAMPLE
gtag.js example of tracking enhanced ecommerce - purchase event, refund event and add_payment_info event (order confirmation page, <head> section):
<script async src="https://www.googletagmanager.com/gtag/js?id=G-**********"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-**********', {
'send_page_view': true,
'ecommerce': 'dataLayer',
'debug_mode':true
});
gtag('event', 'refund', {
'currency': '{{TRANSACTION_CURRECY}}',
'transaction_id': '{{TRANSACTION_ID}}',
'value': '{{TRANSACTION_REVENUE}}'
});
gtag('event', 'purchase', {
'transaction_id': '{{TRANSACTION_ID}}',
'affiliation': '{{TRANSACTION_AFFILIATION}}',
'value': '{{TRANSACTION_REVENUE}}',
'tax': '{{TRANSACTION_TAX}}',
'shipping': '{{TRANSACTION_SHIPPING}}',
'currency': '{{TRANSACTION_CURRECY}}',
'items': {{GOOGLE_ANALYTICS_ECOMMERCE_ITEMS_ARRAY}}
});
gtag('event', 'add_payment_info', {
'currency': '{{TRANSACTION_CURRECY}}',
'value': '{{TRANSACTION_REVENUE}}',
'items': {{GOOGLE_ANALYTICS_ECOMMERCE_ITEMS_ARRAY}}
});
</script>
NEED HELP?
Our dedicated support team is just one call away. We're here to guide you through the customization process, ensuring your PromoTron platform is tailored to your exact specifications. The process of customization has never been easier or more accessible. Contact our Support team!
Comments
0 comments
Please sign in to leave a comment.