Kindly Docs

Go to App
⌘K
▶️Introduction
🔹Getting started with webhooks
🔹Webhooks reference
🔹Message processing
🔹Pattern dialogues
🔹Context memory
🔹Languages
📄Guides and Examples
◽Checking webhook signatures (HMACs)
◽Example: Chatlog webhook
◽Kindly Chat authentication
◽Inbox backup to S3 bucket
◽Add the Spinnaker script tag to your site
◽Set up event tracking with Google Tag Manager (GTM)
⚙️APIs
▪️Application API
▪️Chat API
▪️Chat Log API
▪️Handover API
▪️Nudge API
▪️Statistics API
▪️Ticket webhooks (BETA)
📦Legacy
📝APIs Changelog
🛡️Security
©️License and Disclaimer
Docs powered by archbee 

Set up event tracking with Google Tag Manager (GTM)

To get statistics for your nudges in your GA when also using GTM, you have to set up a selection of event handlers. This is due to GTM blocking events through to GA without these handlers.

Creating the trigger

First off we create a trigger. Give it a name, this will be the main event name. Ex: Kindly Nudge Trigger.

Create the trigger
Create the trigger

Next up, click on Trigger Configuration, and select Custom Event. The event name has to be rck_event. This is because we need to call this from the script.

Trigger config
Trigger config

After this, just save the trigger, and move on to the next step.

Creating the variables

We have to create three variables, one for each of the event tracking variables built into GA: action, label and category. Therefore we have to do this process three times.

Start off with creating a variable and name it: Kindly eventCategory / Kindly eventAction / Kindly eventLabel. Then click on Variable Configuration.

Create the variables
Create the variables

Choose dataLayer variable from the list and name it: eventCategory / eventAction / eventLabel.

Name it
Name it

Repeat this process for all three, then move on to the last step.

Creating the tag

Lastly we have to create the tag to get this to run on events. This all ties together by the tag firing on the event of Nudge open or close. When that happens it fires an event to GA from GTM. So:

Create a new tag and name it: Kindly Nudge Tag. Click on Tag Configuration and choose the GA type you have on your website. For this guide we will be using Universal Analytics.

Create the tag
Create the tag

Then we need to set up the variables. Choose Event as Track Type. Then, fill in your variables by clicking on the Add variable button, matching up the names for them.



Add variables
Add variables

Remember to set up your Analytics settings. You can override the settings with a GA-ID underneath.

Analytics settings
Analytics settings

Click on Triggering and select the trigger we created earlier. That's it, but:

Don't forget to publish your changes.

Updated 05 Sep 2022
Did this page help you?
Yes
No
UP NEXT
Application API
Docs powered by archbee 
TABLE OF CONTENTS
Creating the trigger
Creating the variables
Creating the tag