Implement Enhanced eCommerce Tracking in Google Analytics

Created by Ezra Weinstein, Modified on Thu, 25 Apr 2024 at 12:39 PM by Jeff Cummins

Update October 2023: coreFORCE supports Google Analytics 4. The following events are supported:

  1. Search
  2. view_item 
  3. add_to_cart 
  4. remove_from_cart 
  5. add_to_wishlist 
  6. begin_checkout 
  7. purchase

The instructions below are not up to date for GA4, though the general gist of the steps is similar. See this page from Google for GA4-specific instructions

coreFORCE enterprise supports the analytics data requirements of Google enhanced eCommerce tracking, but there are several steps required on Google's site to set it up. To implement enhanced eCommerce, do the following:


1. Sign up for Google Analytics


If you do not already have a Google Analytics account, sign up for that first at You will be required to sign in with a Google account and identify the website you want to use with Analytics. There is an introduction from Google here:


Do not use the Google Analytics tracking tag. For enhanced eCommerce, you will need to use the Google Tag Manager tracking tag.


2. Sign up for Google Tag Manager


For tracking website visits and demographics, Google Analytics is sufficient, but in order to use enhanced eCommerce, you also need to sign up for Google Tag Manager (GTM). GTM is a separate product that integrates with Google Analytics and replaces the Analytics tracking tag with a much more flexible tagging system.  Sign up for GTM at


There is an introduction from Google here:


3. Link Google Analytics to Tag Manager


Follow these steps from Google to create an Analytics tag in GTM that will link your analytics account with your tag manager account:


You will create a tag called Analytics in GTM and enter your Google Analytics Tracking ID (starting with UA-...) in the configuration.



Publish your changes to Google Tag Manager by clicking on the Overview tab, clicking Submit in the upper right corner, and then clicking Publish.



4. Add the GTM tracking tag to coreFORCE


Once you have signed up for Google Tag Manager and connected it to your Google Analytics instance, you will need to add the tracking tag to coreFORCE. In GTM, there will be an identifier starting with GTM- in the header section.  Click on that to open a popup that contains the javascript tag manager code. It should look like the following screenshot. Click the copy button in the top code snippet to copy the code. Ignore the bottom snippet as it is not needed for coreFORCE.



In coreFORCE, click on Website > Templates > Analytics Code. If you do not already have an Analytics snippet created, click Add to create one. If you already have one created (e.g. for Zaius), you can edit it. Paste the GTM code into the Code box. It can coexist with other analytics platforms if you are already using one or more.



Save changes on the Analytics code. Then in Website > Templates > Templates, open the template for your site (typically it will begin with your business name). On the Javascript Tab, select the analytics code snippet you just created from the dropdown and save the template.



You can test the connection by visiting the front end of your coreFORCE site and then checking in Google Analytics to verify that your traffic is being tracked.


5. Add script to push the ecommerce purchase event to Google in the coreFORCE order response fragment


October 2023: this step is no longer required.  coreFORCE handles the purchase event without any need to customize the order response fragment.  

NOTE: if your site currently references  "dataLayer" in the Javascript of the fragment, the default purchase event will NOT fire.  To use the built-in purchase event, remove any reference to dataLayer from the fragment.  

IMPORTANT: commenting out code that includes "dataLayer" may have inconsistent results. If the purchase event is still not firing after commenting out the code, try removing it from the fragment completely.


6. Turn on enhanced eCommerce in Google Analytics


In Google Analytics, you will need to enable enhanced eCommerce for your site. Click on Admin (next to the gear icon in the lower left corner), and then find eCommerce Settings in the right column.



In eCommerce settings, make sure Enable Ecommerce and Enable Enhanced Ecommerce Reporting are turned on.



7. Create enhanced eCommerce tags in Google Tag Manager


The last step to enable enhanced eCommerce tracking from coreFORCE is to create Tags and Triggers in GTM that will listen for the events that coreFORCE will send. There are 5 triggers and 5 events. They are all set up exactly the same except for the name of the custom event. The event names are these:

  1. search - triggered when searching for a product
  2. view_item - triggered when clicking on product details
  3. add_to_cart - triggered when adding a product to the cart (or changing quantity)
  4. remove_from_cart - triggered when removing a product to the cart (or changing quantity)
  5. add_to_wishlist - triggered when adding a product to the wishlist
  6. begin_checkout - triggered when clicking the start checkout button in the shopping cart page
  7. purchase - triggered when an order is placed


The following will walkthrough the process to create the search event.*  These steps should be repeated for each of the 5 events.


A. In Google Tag Manager, click on Triggers, and then click New in the upper right. 


B. Give the Trigger a name, and then click on "Choose a trigger Type to begin setup". In the trigger type pane that opens, click Custom Event.


C. Enter the event name as search, and select "This trigger fires on all custom events". 

D. Click on Tags in the left side bar and click New.


E. Give the Tag a name, click on "Choose a Tag Type to begin setup" and then click on "Google Analytics: GA4 Event" in the Tag Type pane.



F. Enter the following settings in the Tag Configuration.

  1. Measurement ID: Enter your Google Analytics 4 Measurement ID
  2. Event Name: The event name. Use the recommended event name: search, view_item, add_to_cart, remove_from_cart, add_to_wishlist, begin_checkout, or purchase.
  3. Event Parameters
    • event_category: Value {{Event}}
    • event_action: Value {{Event}}
  4. Under More Settings, Send Ecommerce data and select Data Layer for the Data source.


G. Click on Choose a Trigger to Make this tag fire, and select the trigger that you just created in step 7-A.

H. Click Save to complete the tag configuration.


I. Repeat the previous steps for each of the ecommerce events listed above.


8. Publish changes in Google Tag Manager


Once you have completed all of your trigger and tag setup, in the Overview tab in Google Tag Manager, click on the Submit button in the upper right corner, and then click Publish, as you did in step 3 above. This will make your changes live.

Once all of these steps are completed, you will begin to see ecommerce metrics reflected in Google Analytics as customers shop on your site. This information will appear under Monetization.


*Note that in a previous version of the coreFORCE Google Analytics integration, the event names were all prefixed with "eec", such as "eec.detail", "eec.add", etc.  With the update to GA4, this naming convention has been abandoned in favor of the standard event names that Google uses.

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 atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article