Google Analytics is an essential tool for any website looking to grow and succeed in a competitive market, more so for E-Commerce platforms, as it provides them with insights to user behaviors and traffic sources. This data helps optimize your site's layout, content, and marketing strategies to improve the overall customer experience.
In this article, we will focus on how to link your site to GA4, assuming you already have a Google Tag Manager (GTM) account set up with your site's container. The first step in the process is to create a unique google tag for your website, as it allows the data to flow from your site to Google Analytics.
How To Create a Google Tag For Your Site
Step 1. In the “Workspace” section of your GTM section, go to “Tags” to create a new one.
Step 2. Replace “Untitled Tag” with the name of your tag, select the type “Google Tag” and enter your Tag ID. Learn how to find your Tag ID
Step 3. In the “Triggering” section, set up “All Pages”.
Next up, it’s necessary to create tags for the action or event that you are going to measure.
E-commerce sites typically follow a series of events in the purchasing process, such as viewing an item, selecting it, adding it to the cart, and completing the checkout process. To accurately measure each of these, it's necessary to create a tag for each one. Currently, on GapCommerce sites, there are 12 events:
event: "view_item"
event: "view_item_list"
event: 'select_item'
event: 'checkout'
event: "begin_checkout"
event: "purchase"
event: 'add_to_cart'
event: 'add_to_wishlist'
event: 'view_cart'
event: 'remove_from_cart'
event: 'add_payment_info'
event: 'add_shipping_info'
To create a Google Analytics GA4 Event:
Step 1. Go to your GTM account and in the “Workspace” section, click on “Tags” and select “New”.
Step 2: Name the tag and choose the type Google Analytics: GA4 Event.
Step 3. Fill out the measurement ID and add one of the events mentioned above.
Find out how to find your measurement ID
Under “More Settings”, select “Send E-commerce data”.
Step 4. Set the triggers.
Step 5. Some events should not be triggered in all pages, such as:
Purchasing,
Proceeding to check out,
Placing an order,
Product card click and,
Product carousel engagement.
In those cases, it’s necessary to create a custom trigger, of type: All Elements.
For the purchasing event specifically, the trigger type is “Custom Event”.
After completing these steps, your site will be successfully linked to Google's analytics tools.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article