Page 1 of 1

How to set up e-commerce events in GA4

Posted: Tue Jan 21, 2025 4:31 am
by shaownhasan
We will explain the setup procedure using the purchase completion page as an example. The setup procedure is similar for other pages.

1. Add data layer
Add the code to the data layer in the head tag of the target page. Add the following general manager email lists code.

Parameter Name Corresponding dimensions
transaction_id Payment ID
value Revenue
currency currency
item_name Product name
item_id Product ID
2. Set up Google Tag Manager
Previously, it was necessary to set variables, triggers, and tags in Google Tag Manager. However, with GA4, if you write the appropriate data layer, you no longer need to set variables or event parameters.

Currently, you can set this up by checking "Send e-commerce data" in the advanced settings under "Tag Settings" in Google Tag Manager and selecting "Date Layer" as the data source.