coreFORCE - Website: Implement Enhanced eCommerce Tracking in Google Analytics
coreFORCE Advanced and Enterprise Only
coreFORCE supports Google Analytics 4. The following events are supported:
- Search
- view_item
- add_to_cart
- remove_from_cart
- add_to_wishlist
- begin_checkout
- 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:
Sign up for Google Analytics
If you do not already have a Google Analytics account, sign up for that first at **https://analytics.google.com**. 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: **https://support.google.com/analytics/answer/1008015?hl=en**
Do not use the Google Analytics tracking tag. For enhanced eCommerce, you will need to use the Google Tag Manager tracking tag.
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 **https://marketingplatform.google.com/about/tag-manager/**
There is an introduction from Google here: https://support.google.com/tagmanager/answer/6103696?hl=en
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: **https://support.google.com/tagmanager/answer/6107124?hl=en**
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.
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.
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.
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.
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.
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:
search - triggered when searching for a product
view_item - triggered when clicking on product details
add_to_cart - triggered when adding a product to the cart (or changing quantity)
remove_from_cart - triggered when removing a product to the cart (or changing quantity)
add_to_wishlist - triggered when adding a product to the wishlist
begin_checkout - triggered when clicking the start checkout button in the shopping cart page
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.
Measurement ID: Enter your Google Analytics 4 Measurement ID
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.
Event Parameters
event_category: Value {{ Event }}
event_action: Value {{ Event }}
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.
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.
coreFORCE supports Google Analytics 4. The following events are supported:
- Search
- view_item
- add_to_cart
- remove_from_cart
- add_to_wishlist
- begin_checkout
- 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:
Sign up for Google Analytics
If you do not already have a Google Analytics account, sign up for that first at **https://analytics.google.com**. 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: **https://support.google.com/analytics/answer/1008015?hl=en**
Do not use the Google Analytics tracking tag. For enhanced eCommerce, you will need to use the Google Tag Manager tracking tag.
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 **https://marketingplatform.google.com/about/tag-manager/**
There is an introduction from Google here: https://support.google.com/tagmanager/answer/6103696?hl=en
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: **https://support.google.com/tagmanager/answer/6107124?hl=en**
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.
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.
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.
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.
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.
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:
search - triggered when searching for a product
view_item - triggered when clicking on product details
add_to_cart - triggered when adding a product to the cart (or changing quantity)
remove_from_cart - triggered when removing a product to the cart (or changing quantity)
add_to_wishlist - triggered when adding a product to the wishlist
begin_checkout - triggered when clicking the start checkout button in the shopping cart page
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.
Measurement ID: Enter your Google Analytics 4 Measurement ID
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.
Event Parameters
event_category: Value {{ Event }}
event_action: Value {{ Event }}
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.
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.
Updated on: 07/15/2024
Thank you!