How to setup event tracking and Enhanced E-Commerce on Google Analytics for Thrive via GTM?

How to setup event tracking and Enhanced E-Commerce on Google Analytics for Thrive via GTM?

  1. The first step is to ensure you've completed GTM integration with Thrive, if you haven't yet please follow this link to the instructions for the same: https://thrivenow.zohodesk.com/portal/en/kb/articles/how-to-install-or-integrate-my-google-tag-manager-with-my-order-app-thrive-url
  2. Once completed, open your GTM and the container that you integrated with Thrive.
  3. For your reference, here is the list of the event objects that we're pushing to the data layer: https://thrivenow.zohodesk.com/portal/en/kb/articles/what-are-the-event-objects-pushed-into-the-thrive-website-data-layer
  4. Now, firstly you've got to configure the Built-in Variables on GTM and create User Defined Variables. 
  5. Configure and enable all Pages & History Built-In Variables, they're as follows:
  1. History Source
  2. New History Fragment
  3. New History State
  4. Old History Fragment
  5. Old History State
  6. Page Hostname
  7. Referrer
Stuck? Check out how to create the Built-In Variables here: https://support.google.com/tagmanager/topic/7182737



6. Create New User Defined Data Layer Variables using the event object pushes available as follows:
- Order ID
- Order Type
- Product Name
- Product Price
- Total Price
- Total Quantity

* Note this list isn't exhaustive, you can create more variables from the keys in the different objects available in the data layer. 
  Refer to Step 3 for the list of event objects that are pushed to the data layer. 
  Ensure you choose Version 2 and the Variable Name field matches exactly to the string in the object.

Stuck? Check out how to create the User Defined Variables here: https://support.google.com/tagmanager/answer/7683362?hl=en&ref_topic=9125128

Check out this example of one such variable that has been created, which captures the total price of the items purchased by the customers.



 7. Now, let's create the Triggers.
We'll be creating Custom Event Triggers for each of the event objects mentioned in Step 3, in the Event Name field enter the names as highlighted in Blue.
Here's an example of a Custom Event Trigger for that we created for the Checkout event, note how "eec.checkout" is entered in the Event Name and that firing is enabled for All Custom Events.

 Here are the Custom Event triggers that we suggest creating:
- Ordering Type (Event Name: ordering_type)
- Add to Cart  (Event Name: eec.add)
- Checkout  (Event Name: eec.checkout)
- Purchase  (Event Name: eec.purchase)
- Page View  (Event Name: page_view)



Additionally we've also created a default History Change and Window Loaded trigger for all pages.

8. Lastly, it' time to create the Tags for the Triggers that we've made.

We'll be creating Universal Analytics Tags and the track type is Event.
Let's call the Category field as Ecommerce.
Let's call the Action field as event we're tracking, in this case Purchase
In the label, we're passing the Order ID (we created a Data Layer Variable for the same) of the purchase. 
In the Value, we're passing the Total Price (we created a Data Layer Variable for the same) of the purchase.
*Note that you can name the fields as you require and pass values by creating and assigning different Data Layer Variables.

Use the general Universal Analytics Settings Variable you've created in Google Analytics Settings.
Enable overriding and in the Tracking ID mention the UA ID of the Google Analytics Container you want to pass the data to.

Lastly in More Settings within Ecommerce ensure that Enhanced Ecommerce is True. And check the Use Data Layer option.




9. Using the instructions mentioned above, setup your tracking as you require, once done Preview and see if the values are flowing in properly and Publish once satisfied.

10. In case you need any help, write to marketing@hashtagloyalty.com with your query.

    • Related Articles

    • How to set up event tracking on GA4 for Thrive via Google Tags Manager?

      Here's how you can set up event tracking on GA4 for Thrive via Google Tags Manager - page_view: Tracked when a user views a page on the website. view_item: Tracked when a user views the details of a specific food item or menu add_to_cart: Tracked ...
    • How to connect GA4 to Thrive via GTM?

      To connect GA4 to Thrive via Google Tags Manager, follow the steps given below - 1. Open the Google Tags Manager container that you have installed on your site. 2. Add your GA4 configuration tag. Copy the Measurement ID from GA4 — In the Admin ...
    • How to install or integrate my Google Tag Manager with my order app/ Thrive URL?

      This can be done via the Business Dashboard using the settings. Follow the steps given below: 1. Select Settings from the dashboard navigation. 2. Scroll to integrations and click on Google Tag Manager. 3. You can add your Google Tag Manager ...
    • What are the TDS charges levied for restaurants by Thrive?

      Attention: under Section 194O, all e-commerce operators are mandated to deduct TDS on participants' gross sale amounts. The sale of goods or provision of services from a participant facilitated by an online marketplace falls under these criteria. ...
    • How to setup Thrive on a custom domain for restaurants?

      To setup Thrive on your custom domain follow the steps below: 1. Go to your domain provider, for example Go Daddy. 2. Go to the domain settings and find your DNS record management. 3. Now choose to Add a DNS record. For record Type, select A. 4. ...