Is it possible to pass hidden data attributes through to the chat agent?


  • Ramin Shokrizadeh

    Hi there Derek,

    Thanks for sharing your use case and question in the community. We have customer today (including ourselves) that do what you are asking for by using visitor tags that are applied via the JS APIs.

    You can learn more about the specific API here:

    If you are using the Web Widget + Integrated Chat Experience

    If you are using the Chat standalone widget

    Tags are not visible to the end user and will be visible to the agents while chatting. These tags will get passed to the ticket and allows for future analysis via the UTM values by building reports using the tag values.

    Hope that helps out,


  • Derek McCallum



    Would you by chance be able to provide the javascript example for adding a "utm_medium" tag with a value of "PPC" as an example?   It would be great to see it for both the "Web Widget + Integrated Chat Experience" and the "Chat standalone widget".    I see the documentation, but need a little more guidance.   I think if you could show me an example using this use case it would help tremendously.  



  • Ramin Shokrizadeh

    Hi Derek,

    We cannot provide code examples but if you look around the internet you can find examples of how to read UTM parameters using JS ( and then add those values as tags with the APIs mentioned earlier.

    If you are still having trouble getting it to work, please email



  • Derek McCallum

    Ramin, we already now how to capture UTM parameters. We already have the values. 8 was specifically talking about Zendesk api for tags. I see the documentation but I am not sure just looking at the below how this allows for a custom tag name with a custom value.

    Do you just have to do this?

    window.zESettings = {
    webWidget: {
    chat: {
    tags: ['utm_medium: ppc']

  • Ramin Shokrizadeh

    If you are asking generally how to use the API, the code sample in the docs and your example should work. You should ensure you don't send characters that are not supported in tags. The doc below will help you understand what is/isn't allowed.

    Most people will use tags like "medium-mediumname" and avoid using special characters/spaces.


Please sign in to leave a comment.

Powered by Zendesk