Recent searches


No recent searches

How can I enable or disable certain Web Widget (Classic) components on different pages of my site?



Edited Aug 21, 2024


5

6

6 comments

How do I add Wed Widget Classic as a Google Tag? 

0


Hi Katie - we've got some documentation on that here: Adding the Web Widget (Classic) via Google Tag Manager

0


Hi. Im planning to implement Zendesk Chat using Google Tag Manager.

But, an issue - I have a couple of URLs I dont want the chat to show on. 

Is there a way to add "not show chat if url contains "12345"? 

How do I do this? Is it something I add to the script in GTM? 

0


image avatar

Miranda Burford

Zendesk Product Manager

Hi @...,

There's a couple of ways you could solve for this.

  1. You could set conditions within Google Tag Manager to not load the Web Widget code snippet on the URLs where you don't want it to show.
  2. Alternatively, you could load the Web Widget code snippet on all pages and use the Web Widget Hide API to remove it from those URLs.

Hope this helps!

- Miranda.

0


"or directly in the web page by using a certain conditionality." What does this mean? I'm just trying to suppress chat on a specific set of HC pages, and I just cannot seem to figure out how to make this happen. 

0


image avatar

Eric Nelson

Zendesk Developer Advocacy

Hey CJ,
 
I think what they're referring to in this article is leveraging DOM events or something similar to track where you are in the help center. Then using that info to show or hide the widget components.
 
For example:
 
if (window.location.pathname == '/examplePage'){
//Some logic to hide certain components}
else {//Some different logic} 

0


Please sign in to leave a comment.