Articles on: Client Side

Creating Google Analytics 4 Event Tags

Setting up GA4 Event Tags allows you to track user actions on your website, such as page views, custom interactions, or events triggered by a DataLayer. By configuring event tags, you ensure that the necessary data is sent to Google Analytics 4, helping you monitor user activity and measure the performance of your website effectively. This section will guide you through creating and configuring different types of GA4 event tags.

In this document, you will learn how to set up, configure, and manage GA4 event tags to ensure accurate tracking and reporting.

Page View Event

DataLayer Event

Let’s get started 🚀

Page View Event



Page view events are used to track when a user loads or navigates to a specific page on your website. These events are essential for understanding page traffic, user behavior, and engagement.

Create GA4 Page View Event Tag



The first step is to create a Page View Event Tag in Google Tag Manager. This tag will send a page view event to GA4 every time a user visits a page. Setting up this tag ensures that page load data is accurately collected and reported in your GA4 property.



Configure GA4 Page View Event Tag



Once the Page View Event Tag is created, configure it by assigning key details such as the Measurement ID and the event name (page_view). Proper configuration ensures the tag fires at the correct time and sends the necessary information to Google Analytics.

Specify the event name carefully, and use recommended event names for better tracking and reporting. Learn more.



DataLayer Event



DataLayer events allow you to track more advanced user interactions or events that occur beyond simple page views, such as button clicks, form submissions, or purchases. These events rely on DataLayer objects, which contain specific event information that can be passed to GA4.

Create GA4 Tag for Data layer Event



Creating a GA4 tag for a DataLayer event involves linking your GA4 event tag with the DataLayer object. This ensures that events defined in your website's DataLayer (e.g., view_item, add_to_cart) are sent to Google Analytics for accurate tracking and reporting.



Configure Data Layer Event Tag



After creating the GA4 tag, configure it with the correct event name and parameters from the DataLayer. Add parameters such as event_id or other custom values to ensure detailed and accurate data is sent to GA4. Proper configuration ensures that DataLayer events are captured and tracked effectively in Google Analytics.

For the event name use a name that is appropriate for the datalayer event

DataLayer EventGA4 Event Name
trytagging_view_itemview_item
trytagging_view_item_listview_item_list
trytagging_select_itemselect_item
trytagging_add_to_cartadd_to_cart
trytagging_view_cartview_cart
trytagging_remove_from_cartremove_from_cart
trytagging_begin_checkoutbegin_checkout
trytagging_add_shipment_infoadd_shipment_info
trytagging_add_payment_infoadd_payment_info
trytagging_purchasepurchase


To attach additional data from the DataLayer as event parameters, follow the required steps to retrieve the relevant values.

Updated on: 06/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!