π Important: If you are unsure where to start with your Google Analytics setup then use our START HERE article
Google Analytics 4 with Google Tag Manager
In this setup, we assume that you are starting your Google Analytics account fresh or for the first time. We won't worry about setting up a GA 3 account as it has been deprecated and won't be supported any longer. Thus, we will jump right in to creating a brand new GA 4 account.
π Important: Don't use this setup if you already have Google Analytics 3 UA already setup. Use Setup 1 (Google Analytics 4 Legacy Setup with GA3) as it will give you the best side by side setup for both GA3 and GA4
Step 1 - Create a Google Analytics 4 Account
Step 2 - Create a Google Tag Manager Account
π Important: If you have a Google Tag Manager account already, you can skip this step
Step 3 - Ecommerce Event setup
You will need to use the tables below the video to copy and paste from into your Tags, Variables, and Triggers.
Data layer Variables
Name | Data Layer Variable Name |
Purchase affiliation | ecommerce.purchase.actionField.affiliation |
Purchase coupon | ecommerce.purchase.actionField.coupon |
Purchase shipping | ecommerce.purchase.actionField.shipping |
Purchase tax | ecommerce.purchase.actionField.tax |
Purchase transaction_id | ecommerce.purchase.actionField.id |
Purchase value | ecommerce.purchase.actionField.revenue |
Items list | ecommerce.purchase.products |
Purchase Event Parameters
Parameter Name | Value (If you use the same data layer variable names as shown in the video) |
transaction_id | {{Purchase transaction_id}} |
value | {{Purchase value}} |
affiliation | {{Purchase affiliation}} |
coupon | {{Purchase coupon}} |
shipping | {{Purchase shipping}} |
tax | {{Purchase tax}} |
items | {{Items list}} |
currency | Enter your currency code (GBP, EUR, USD, CAD) |
Thank You Page Trigger details
Path Path | equals | /checkout/thank-you |
π Important: Google Analytics 4 takes 24 hours to update. You won't see any of your Events show-up, until the 24 hours has elapsed.
That's it, you have completed the setup. Well Done!! π