How To Sync Your Site's GTM Data To Google's Analytics Tool

Created by Anabel Arias, Modified on Thu, 1 Aug at 2:29 PM by Juan Manuel Libera Frometa

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:


  1. event: "view_item"

  2. event: "view_item_list"

  3. event: 'select_item'

  4. event: 'checkout'

  5. event: "begin_checkout"

  6. event: "purchase"

  7. event: 'add_to_cart'

  8. event: 'add_to_wishlist'

  9. event: 'view_cart'

  10. event: 'remove_from_cart'

  11. event: 'add_payment_info'

  12. 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

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article