Skip to main content
All CollectionsTreez EcommerceSettings & Configurations
Setting Up Google Analytics for Treez Ecommerce Using Google Tag Manager
Setting Up Google Analytics for Treez Ecommerce Using Google Tag Manager

How to gain visibility into your website's conversion funnel using GTM to configure key tracking events for Google Analytics

T
Written by Treez Support
Updated yesterday

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

  1. Login to Google Tag Manager

  2. Copy the Container ID

  3. Login to your Treez Ecommerce Admin

  4. Go to Settings → Google

    1. Flip the GTM Active toggle ON

    2. Paste your GTM-ID

    3. Hit Update & then Purge Cache

Part 2: Configure Ecommerce Event Triggers in Google Tag Manager

  1. Login to Google Tag Manager and click on the container you configured in the Treez Ecommerce Admin

  2. Click Triggers from the menu on the left side of the dashboard. We will be setting up a trigger for all Ecommerce Events.

  3. Ecommerce Events Custom Event Trigger:

    1. Click New, name your Trigger. E.g. ‘Dispensary ABC | Ecommerce All Events

    2. Select Trigger Type > Custom Event

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

  5. Check the “Use regex matching” box

  6. Ensure the ‘All Page Views’ radio button is selected (this should be pre-selected)

  7. Save

Part 3: Configure Tags in Google Tag Manager

  1. Start by going into Google Analytics and finding your Measurement ID

    1. Click Settings → Data Streams

  2. Click the Data Stream

  3. Copy the Measurement ID and ensure the Enhanced Measurement toggle is ON

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

  5. Configure a tag for Ecommerce Events. This tag will link back to your Google Analytics account.

    1. Click New → Name your tag. E.g. ‘Dispensary ABC Ecommerce’ → Choose a tag type → Google Analytics → Google Analytics: GA4 Event

    2. Input your Measurement ID from step 1

    3. Enter {{Event}} into the Event Name field

    4. Expand the More Settings menu and check the Send Ecommerce data checkbox. Data Source should be set to ‘Data Layer’

  6. Click Triggers → Select your Ecommerce All Events Trigger and Save.

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

Did this answer your question?