Setting up and using Google Analytics for the Web Widget (Classic)



Edited Apr 30, 2025


2

27

29 comments

Hello Laura,

To add the Web Widget (Classic) via Google Tag Manager, you don't actually need a specific Zendesk trigger.

Please use the following steps:
1) Create a New Tag in Google Tag Manager: Open your Google Tag Manager account, navigate to your website's container, and click on "New Tag".
2) Configure the Tag:
  • Choose a name for the tag (something like "Zendesk Web Widget").
  • Click on "Tag Configuration" and choose "Custom HTML" as the tag type.
  • Paste the Web Widget script you copied from Zendesk into the "HTML" field.
3)  Setup Triggering:
  • Click on "Triggering" and then click on "All Pages" to make sure that the Web Widget is added to all pages on your website. You might need to set up a different trigger if you want the widget to show on specific pages only.
4) Save and Publish: Click "Save" and then "Publish" to make your changes live.

Hope it helps. 
Thanks.

0


Hi 1263659888089

 

Thanks for your assistance. I tried adding the widget as a tag via GTM (option 2). However it requires adding a trigger. What would the trigger be? It doesn't show on the article

 

Thanks 

Laura 

0


Hello Laura,

Thanks for your question. We have 2 custom options there:
1. Customizing Web Widget events tracking to third-party analytics services via Google Analytics trackers
2. Another option is to add the Web Widget (Classic) via Google Tag Manager for tracking custom events there
You can deploy GTM tags using Tag Assistant

Best

0


Hi team, 

It mentions that the widget supports GA4 now, but the events aren't tracking on GA4 for some reason. Can you please assist? Should I try using GTM to trigger the events to GA4? Integrating the Zendesk Widget with GA4 | Tracking Chef 

 

Laura

0


Hey all

I've been struggling with tracking Zendesk+GA4 for my clients as well, and ultimately came up with a simple script that uses the Zendesk JS API to trigger events into GA4 (directly or via GTM).

You can see the full details in this blog post I've written

Integrating the Zendesk Widget with GA4 | Tracking Chef

If you have any questions on this just reply to this comment :)

Elad

0


Hi! I was wondering if it's possible (through Zendesk) to import a DataLayer so the DL triggers when a user sends his first message via chat. We are deploying GA4, but as I saw in the previous comments, GTM is the only solution?

Thank you in advance for your reply!

Lucija

0


Hello Marc Soares,

Thanks a lot for your reply. I can confirm that we have some active work regarding natively supporting GA4 and Zendesk integration. However, unfortunately, I couldn't provide any ETA about the topic at this moment. 

0


Hi 1263659888089. Thank you for the suggestion. The documentation is not entirely comprehensive, but I think I can see how we can send events to GA4 using the method described here: https://developer.zendesk.com/documentation/classic-web-widget-sdks/web-widget/getting-started/customizing-web-widget-events-tracking-to-third-party-analytics-services/.

Since this would require custom development effort, can you provide an update on when Zendesk will natively support GA4? Universal Analytics is being sunset, and your clients are already deploying GA4. It would be advisable for you to support GA4 as soon as possible.

0


Hello Jessica Owen and Marc Soares

That's a good question. In this case, we highly recommend setting up the Web Widget with GTM. That helps you analyze Web Widget analytics separately via Custom HTML Tag inside GTM. Please follow the steps from this article from our developer portal - Adding the Web Widget (Classic) via Google Tag Manager.

Kind Wishes
 

0


Yea that was my response back :) I am more interested in tracking the widgets actions like-for-like with the UA integration versus the pages themselves. 

0


Sign in to leave a comment.