Home > FAQ Google Analytics
Categories: FAQ | Integrations & Plugins | Tips & Tricks | JavaScript API | Technical Options
(Last Updated On: )
About This Article
This article clarifies commonly asked questions about Google Analytics.
My SnapEngage events are not being tracked in Google Analytics
Check your website to see if the Google Analytics events and SnapEngage code have been added correctly. Be sure that the Google Analytics Global Tracking Code is added directly below the SnapEngage code.
Are you using the same version of Google Analytics across both the Global Site Tracking Code and the events you are tracking?
Has it been copied correctly?
If so, the code may have been added twice; once in Google Tag Manager and once on the site itself. Remove one instance.
The Google Analytics Tracking code, and the SnapEngage code containing the Google Analytics events, should both be installed within the same Custom HTML snippet in Google Tag Manager.
If you are only tracking Proactive engagement, be sure to start a Proactive Chat, for example.
If you are not sure what each event tracks, you can check this to understand more:
https://developer.snapengage.com/#javascript-events
Where will you see those events?
In your Google Analytics account under Behaviour > Events > Overview.
Click here to see a clear screenshot
So you only want to track Proactive Chat Engagement?
You can find the code for this here. What you do with this snippet is to track the StartChat event only in case the chat was a proactive one:
ga.js (legacy analytics)
analytics.js
gtag.js
Since you will be tracking all proactive chat invites with OpenProactive and with StartChat the responded proactive chats, you divide the latter with the first and you get the percentage of how many proactive invites have been answered by visitors.
Using the labels of the above screenshot:
Proactive Chat Engagement = ProactiveEngaged / proactivePrompt
And can I actually measure how successful a specific Proactive Chat message is?
Yes you can! You can calculate the “Proactive Engagement Rate” for each Proactive Chat message you have set up. You can read more about this here and find a sample code for the newest version of the analytics code below.
gtag.js
When you use this proactive engagement tracking, can you still use a separate StartChat tracking snippet to track all chats? Manual included.
Of course, you can! Sky’s the limit.
Want to track Proactive Chat Engagement AND manual chats?
Here are some more examples for you.
ga.js (legacy analytics)
analytics.js
gtag.js
Can I pass JavaScript variables as Label values?
Yes, absolutely! For example, if you define a variable called accountNumber, like so:
Please note, this needs to be added prior to the SnapEngage code being initiated. You can read more here.
Next, in the event, you would need to replace the Label value with the variable name, like this example below:
This will display the value 123456 as the Label value in Google Analytics.
Published October 23, 2019