Recent searches


No recent searches

Reinitialize zendesk script with iframe



Posted Apr 03, 2024

I use the standard zendesk script when initializing my application. Everything works fine. But I have several different chat rooms and at a certain action for example the user has logged into my application, I should change {my_key} and a new zendesk widget will load. But this is not happening. When I change the conditions, {my_key} is inserted correctly, but the widget itself does not change. 
I tried to delete the script and div element in which the Iframe zendesk. Tried to disable cookies for zendesk, with popposchuyu window.zE('messenger:set', 'cookies', false); and then re-enable. 
In general, tell me how to dynamically change the key in script tag src, load a new chat?

<!-- Start of priokunden Zendesk Widget script -->
<script id="ze-snippet" src="https://static.zdassets.com/ekr/snippet.js?key={my_key}"> </script>
<!-- End of priokunden Zendesk Widget ->


0

1

1 comment

Sign in to leave a comment.

Didn't find what you're looking for?

New post