Enhanced ecommerce tracking via Google Tag Manager


Our Google Analytics integration is great for tracking your shopper interactions with Gobot. However, if you are looking to track enhanced ecommerce events like product clicks and additions to cart, you'll need to further leverage Gobot's Google Tag Manager (GTM) integration.

In Bot Mode, click Bot Settings / Advanced / Analytics & Tracking and enable GTM, as shown below:

As a preliminary step, you will need to make sure you have a GTM account set up - this can be done here.

If you are on Shopify, you can follow the steps in this doc to get GTM set up on your store. This will involve pasting two code snippets in your theme file.

Once you have your code snippets in place, you can follow the steps below in GTM to set up your tags.

Next, click Tag Configuration.

Next, choose tag type - Google Analytics: Universal Analytics. Google Analytics Version 4 is not currently supported by Gobot for product click and add to cart event tracking (although the basic Google Analytics integration is fully functional).

Next, under Track Type select Event from the drop down menu as show below. Also, enter "Gobot" in the Category field.

Next, scroll further down and under Google Analytics Settings click the dropdown menu and select New Variable.

Upon selection of New Variable in the drop down menu, you will see the screen below where you can enter your Google Analytics ID. Also, make sure to click More Settings and click the checkbox for Enable Enhanced Ecommerce Features and Use data layer.  Finally click Save in the upper right hand corner.

Next, we need to set up the triggers. Click on the Triggering box as shown below.

Click on the + arrow as shown below to create a trigger for the tag you just created.

Next, click on the Trigger Configuration box as shown below.

Next, select Custom Event as the trigger type.

Next, for Event Name enter "addToCart" and then repeat the process and create another custom event trigger called "productClick".

Finally, click Submit and Publish. If you click back on the dash you will see what you've created - a Google Analytics tag with two firing triggers, one for when Gobot recommended product is added to cart and another for when a Gobot recommended product is clicked. 

Now that you've set up Gobot to track add to cart and product click, you will want to find this data in Google Analytics. Under Conversions/Ecommerce/Product List Performance (left hand navigation) you will find the data you are looking for. Make sure to click Product above the table and select the correct date range towards the top of the screen.

Next, click Secondary dimension over the table and select Event Category, as shown below.

Finally, click Advanced adjacent the magnifying glass over the table to the right and this will reveal the filtering fields below where you can enter "Gobot" in the Event Category Containing field.

Ultimately, this will yield the following enhanced ecommerce view revealing product clicks and add to carts attributable to Gobot, as shown below (stats intentionally hidden).

Copyright 2021, Gobot LLC, All rights reserved.


Was this article helpful?


You might also find interest in these related articles:

  1. Track your chatbot using Google Analytics