Google Tag Manager Integration
Analyze Chatsimple activity in your Google Analytics dashboard (and more).
Last updated
Analyze Chatsimple activity in your Google Analytics dashboard (and more).
Last updated
Pre-requisites: - Awareness about 'Google Tag Manager'. - Otherwise, watch this & this video to get an overview.
You can find your GTM ID in your Google Tag Manager dashboard. It starts with 'GTM-...' as shown in the image below.
Then add it to your embed code as shown below
You can choose whatever trigger name makes sense, but the 'Event name' must be exactly as shown in the table below.
asked_chatsimple_nav
Sent at least one message using the Chatsimple AI Nav.
chatsimple_main_cta_clicked_nav
Clicked the main call to action (CTA) in the AI Nav.
chatsimple_leadform_submitted_nav
Submitted a lead form in the AI Nav.
asked_chatsimple_widget
Sent at least one message using the Chatsimple widget.
chatsimple_main_cta_clicked_widget
Clicked one of the main call to actions (CTAs) in the widget
chatsimple_leadform_submitted_widget
Submitted a lead form in the widget
See below the required configuration. Remember that here, you also have to input your measurement ID from your Google Analytics Account.
Click 'Preview' and in debug view ensure all the relevant tags are being fired. Then click 'submit' to save changes.
You might want to take this Chatsimple activity and forward it to your data tools, for example using form submission details to uniquely id a customer. For that, follow along.
To implement that, paste the following custom html code with the trigger you created above for 'chatsimple_leadform_submitted_nav' or 'chatsimple_leadform_submitted_widget' as shown below.
The above tag should console log the following for a form submission by John Smith, with an email john.smith@gmail.com.
Note that consent_checked is false by default since that had not been activated in the appearance section. Some regulatory environments need consent to store this data while others do not.
Now you can do anything with that data, for example, if you had to send it to another tool, say posthog, you can do so as below by changing the Custom HTML above.
And a few minutes later, you should be receiving your data.
Note that for this to run, we had to initialize posthog first. Most likely this would be needed for your tool of interest as well.
To initialize, you have to create a separate GTM Tag with the trigger set to 'All Pages' as below.
You should coordinated with a developer to obtain the initialize code above if needed.
ps. If you struggle in the above implementation, reach out to ammar.khan@chatsimple.ai.
To jog your memory, this is what we mean by the Chatsimple embed code.