Best Practices
Using Google Tag Manager (GTM) in a Single Page Application
If your website is a Single Page Application you may have issues if you want to change the parameters in the init function, like the category for instance, while the visitor clicks and interacts with your website.
To allow that you must configure the Google Tag Manager to trigger in the History Change event. Refer to this documentation page to additional details.
Note: You should also have the Page View trigger to make chat loader appear in the page load.
Also, because the integration script can now already be loaded in your website, you need to call the destroy function before anything else. For example, by calling it just before the guuru variable initialization:
<script src="https://static.guuru.com/loader/v1.0/chat.min.js"></script>
<script>
if ('guuru' in window) {
window.guuru.destroy();
}
window.guuru = Guuru();
window.guuru.init({
"appId": '<YOUR_APP_ID>',
});
</script>