Overview
In order to grow ecommerce as an order channel, it is important to have visibility into visitor and shopper behavior. Most important is your conversion funnel, which shows a customer's journey from visiting your website to making a purchase.
Using Google Tag Manager, you can easily install Google Analytics and set up tracking for key conversion events on your Treez Ecommerce website.
Google Analytics is a free platform that allows you to understand your site's customer journey and improve marketing ROI.
Google Tag Manager is a free tool that lets you manage tags on your website or mobile app without changing your code.
Key conversion events include viewing a product page, adding a product to cart, viewing the cart, beginning checkout, and submitting an order.
Prerequisites
Before proceeding with the remainder of the setup process, first make sure you have completed these prerequisite tasks:
Access to your Google Analytics & Google Tag Manager Account. These accounts are not managed by Treez, and will need to be set up by your organization.
A Google Analytics Account with a Google Tag Manager ID associated with the account. For instructions, please visit the Google Help Center.
Access to your Treez Ecommerce administration dashboard. If you do not have access, please reach out to [email protected].
How to Setup Google Analytics with Google Tag Manager
Part 1: Add your GTM ID to Treez Ecommerce Admin
Login to Google Tag Manager
Copy the Container ID
Login to your Treez Ecommerce Admin
Go to Settings → Google
Flip the GTM Active toggle ON
Paste your GTM-ID
Hit Update & then Purge Cache
Part 2: Configure Ecommerce Event Triggers in Google Tag Manager
Login to Google Tag Manager and click on the container you configured in the Treez Ecommerce Admin
Click Triggers from the menu on the left side of the dashboard. We will be setting up a trigger for all Ecommerce Events.
Ecommerce Events Custom Event Trigger:
Enter the following string in the Event Name field. There are the events that will be sent from your ecommerce site to your Google Analytics dashboard:
view_item|select_item|add_to_cart|remove_from_cart|view_cart|begin_checkout|add_payment_info|add_shipping_info|purchase
Check the “Use regex matching” box
Ensure the ‘All Page Views’ radio button is selected (this should be pre-selected)
Save
Part 3: Configure Tags in Google Tag Manager
Start by going into Google Analytics and finding your Measurement ID
Click the Data Stream
Copy the Measurement ID and ensure the Enhanced Measurement toggle is ON
Return to Google Tag Manager. Click Tags from the menu on the left side of the dashboard. We will be setting up a tag for Website Traffic and a tag for all Ecommerce Events. This tag will link back to your Google Analytics account.
Configure a tag for Ecommerce Events. This tag will link back to your Google Analytics account.
Click New → Name your tag. E.g. ‘Dispensary ABC Ecommerce’ → Choose a tag type → Google Analytics → Google Analytics: GA4 Event
Input your Measurement ID from step 1
Enter {{Event}} into the Event Name field
Expand the More Settings menu and check the Send Ecommerce data checkbox. Data Source should be set to ‘Data Layer’
Click Triggers → Select your Ecommerce All Events Trigger and Save.
In the Google Tag Manager workspace menu, Submit your changes.
Part 4: View Your Google Analytics Reports
Google Tags take 24-28 hours to start gathering data. After this time, you will be able to view your Google Analytics reports within the Google Analytics Dashboard.