Okendo's integration with Google Tag Manager (GTM) allows you to create tags, triggers, and variables in order to capture events in analytics platforms, specifically Google Analytics 4 (GA4). You'll gain direct insights into the impact of customer reviews and customer-generated content on key metrics such as conversion rates, average order values, and revenue. You can also see how many transactions are a result of your customer's interaction with your reviews widget.
Note: If you're using Universal Analytics, use this guide to capture events in your analytics platform. We also support integrating your Okendo account with Global Site Tag (gtag.js). Click here to learn more.
In this article, you'll learn how to:
Before you begin
The Okendo + GTM integration makes use of your existing Google Tag Manager setup with Shopify. Click the button below to learn more.
Note: You will only be able to add the GTM code to checkout.liquid
if you have a Shopify Plus store. Adding the code to theme.liquid
will let you collect Okendo analytics events.
Enable Google Tag Manager in Okendo
Open your Okendo admin.
Go to Settings > Widgets from the sidebar.
Select Google Tag Manager in the Google Analytics Provider drop-down list.
Click Save.
Set up Google Tag Manager
You'll need to set up the following configuration in your Google Tag Manager container to support the collection of events in both Google Analytics 4 and Universal Analytics.
Variable Setup
Go to Workspace > Variables.
Click New under User-Defined Variables.
Click Variable Configuration and select Data Layer Variable.
Set the Data Layer Variable Name to
event_label
.Name the variable
Event Label
and click Save.
Triggers Setup
Go to Workspace > Triggers.
Click New under Triggers.
Click Trigger Configuration and select Custom Event.
Set the Event name to
^okendo_.*
and enable Use regex matching.Select All Custom Events.
Name the trigger
Okendo Event
and click Save.
Set up Google Tag Manager to support Google Analytics 4
You'll need to set up the following configuration in Google Tag Manager to support the collection of events in Google Analytics 4.
Initial Setup
Create a new Google Analytics 4 Configuration tag called
GA4 Config
. Find your GA4 Measurement ID by following these instructions.
Variable Setup
Create 3 additional User-Defined Variables with the following parameters:
Variable Name | Data Layer Variable Name |
Product Label | product_label |
Filter Value | filter_value |
Search Query | search_query |
Tags Setup
Navigate to Tags (Workspace > Tags).
Click New under Tags.
Click Tag Configuration and select Google Analytics: GA4 Event.
Set the Configuration Tag to the one you created in Step 2.
Set the Event Name to
{{Event}}
.Click Add Row under Event Parameters with the Parameter Name
event_label
and the Value{{Event Label}}
.Click Triggering and select Okendo Event.
Name the tag
Okendo | GA4 Event
and click Save.
Universal Analytics
You'll need to set up the following configuration in Google Tag Manager to support the collection of events into Universal Analytics.
Note: Universal Analytics will no longer process new data as of July 1, 2023. If you haven’t already, you should prepare to switch over to Google Analytics 4.
Variable Setup
Create a new Google Analytics settings variable called
Google Analytics Settings
.
Tags Setup
Go to Workspace > Tags.
Click New under Tags.
Click Tag Configuration and select Google Analytics: Universal Analytics.
Set the Track Type to
Event
.Under Event Tracking Parameters, set the Category to
Okendo
, the Action to{{Event}}
, the Label to{{Event Label}}
.Set Google Analytics Settings to
{{Google Analytics Settings}}
.Click Triggering and select Okendo Event.
Name the tag
Okendo | UA Event
and click Save.
ℹ️ Make sure to publish your Workspace Changes once you are ready.
Viewing Captured Events
An interaction event happens whenever a customer engages with your reviews widgets in these ways:
Clicks Show More reviews
Filters or sorts through your reviews
Clicks the star icons at the top of the product or collection page
Clicks an image or video to enlarge it
Clicks up-vote or down-vote on a review
Google Analytics 4
You can view captured events for Okendo widgets by going to your GA4 property in the Google Analytics dashboard and following these steps:
Go to Reports > Engagement > Events.
Search for
okendo_
in the search box and press Enter.
Universal Analytics
You can view captured events for Okendo widgets by going to your UA property in the Google Analytics dashboard and following these steps:
Go to Behaviour > Events > Top Events.
Search for
okendo_
in the search box and press Enter.