Google Analytics, Global Site Tag, Google Tag Manager and Google Ads articles separately discuss the concept of Event (event).
You can reach out for support regarding Google Analytics here.
Google Analytics Events
Although ga.js1, followed by analytics.js2 and finally gtag.js3 4 have different usage patterns, events generally begin with page load interactions (hitType/pageview) and track all user interactions within a page (hitType/event) throughout the session, enabling interaction tracking and maintaining it under the Google Analytics account. Events can be tracked independently of a web page load or mobile screen load. Various user interactions such as downloads, clicks (links, buttons, form elements, images, etc.), gadgets, Flash elements, embedded AJAX components, scroll actions, session processes, and videos can be captured during the definition phase.
It’s worth highlighting the difference between Page Tracking and Event Tracking. Page Tracking (page tracking) measures the number of times a specific page is viewed on a website and serves as a foundation for other activities5. Pages typically correspond to the entire HTML document, but can also represent dynamically loaded content (virtual pageviews). Event Tracking, on the other hand, refers to user interactions performed on content that is independent of a web page or screen (such as mobile, AR, VR, or other user interfaces). Examples of such interactions include downloads, ad clicks, gadget interactions, Flash elements, AJAX embedded elements, video plays, and similar actions. A basic event is communicated through the following function parameters:
// UA
gtag('event', '<action>', {
'event_category': '<category>',
'event_label': '<label>',
'value': '<value>'
});
// GA4
gtag('event', '<myCustomEvent>', {
"TheEventAction": "<myEventAction1>",
"TheEventLabel" : "<myEventLabel1>"
});
Using the gtag() function in conjunction with gtag.js, the system has gained the ability to more efficiently utilize Default Google Analytics Events when sending an event via the send parameter of the ga() function in analytics.js. An example of a predefined gtag event, such as a login, is shown below6:
// UA & GA4
gtag('event', 'login', { method : 'Google' });
In addition to user engagement events, commerce events (ecommerce) are also available for use. Below you can see the default Google Analytics Events definitions related to Universal Analytics (UA)7.
| Activity Name | Default Category | Default Event Type |
|---|---|---|
search | engagement | search_term |
generate_lead | engagement | |
login | engagement | method |
select_content | engagement | content_type |
share | engagement | method |
sign_up | engagement | method |
view_item | engagement | |
view_item_list | engagement | |
view_promotion | engagement | |
view_search_results | engagement | search_term |
add_payment_info | ecommerce | |
add_to_cart | ecommerce | |
add_to_wishlist | ecomaret | |
begin_checkout | ecommerce | |
checkout_progress | ecommerce | |
purchase | ecommerce | |
refund | ecommerce | |
remove_from_cart | ecommerce | |
set_checkout_option | ecommerce |
GA4 (Google Analytics 4) recommends automatically collected (automatically collected events)8 events for all web sites and apps, retail sales and e-commerce, businesses, education, local opportunities and real estate, travel and games. Below you can see the activities grouped by e-commerce.
| Event | Trigger | Parameters |
|---|---|---|
add_payment_info | User submits payment details | coupon, currency, items, payment_type, value |
add_shipping_info | User submits shipping details | coupon, currency, items, shipping_tier, value |
add_to_cart | User adds an item to their shopping cart | currency, items, value |
add_to_wishlist | User adds an item to their wishlist | currency, items, value |
begin_checkout | User starts the checkout process | coupon, currency, items, value |
generate_lead | User submits a form or requests information | value, currency |
purchase | User completes a purchase | affiliation, coupon, currency, items, transaction_id, shipping, tax, value |
refund | Refund is issued | affiliation, coupon, currency, items, transaction_id, shipping, tax, value |
remove_from_cart | User removes items from their shopping cart | currency, items, value |
select_item | User selects an item from a list | items, item_list_name, item_list_id |
select_promotion | User selects a promotion | items, promotion_id, promotion_name, creative_name, creative_slot, location_id |
view_cart | User views their shopping cart | currency, items, value |
view_item | User views an item | currency, items, value |
view_item_list | User views an item or promotion list | items, item_list_name, item_list_id |
view_promotion | User is shown a promotion | items, promotion_id, promotion_name, creative_name, creative_slot, location_id |
GA4 events are categorized by event name and are available under the appropriate report. Event names defined in e-commerce can be found under e-commerce reports, while viewing all events and marking specific events as conversions is also possible.
In UA reports, you can view these activities in detail under Google Analytics account > Property > View > Behavior; in GA4 reports, you can access them under Engagement > Events, Events > All Events.
Additionally, under the Secondary Dimension, you can use the Most Commonly Used and Behavior options to select Event Action, Event Label,, and Event Category, and filter using Advanced Search. The same path can also be used to track during the segmentation process.
You can also use the Google Analytics Debugger Chrome extension for event testing and debugging.
Footnotes
- Introduction to ga.js (Legacy). Google Analytics ↩
- Add analytics.js to Your Site. Google Analytics ↩
- Measure Google Analytics Events. Universal Analytics ↩
- Events. Google Analytics ↩
- How to instrument Universal Analytics events as Google Analytics 4 events. Google Analytics ↩
- Google Analytics 4 Events. Global Site Tag ↩
- Measure Google Analytics Events. Universal Analytics ↩
- Automatically tracked events. Analytics Help ↩