GUURU for Developers

GUURU for Developers

  • Docs
  • Contacts

›Loader

Loader

  • Getting Started
  • Best Practices
  • Public Interface
  • Handling Events
  • Conversion
  • Cookies
  • Examples

SmartChat

  • Getting started
  • Chat Widget

    • Getting started
    • Parameters

SmartForm

  • Getting Started

Admin API

  • Getting started
  • Examples
  • API Reference

    • Queries
    • Mutations
    • Types
    • Pagination

Webhooks

  • Getting started
  • Examples

Integrations

  • Facebook
  • Freshchat
  • Salesforce
  • Zendesk
  • Microsoft
  • Third Party Messaging

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>
← Getting StartedPublic Interface →
  • Using Google Tag Manager (GTM) in a Single Page Application
GUURU for Developers
Docs
SmartChatSmartFormAPI Reference
Community
GitLabFacebookLinkedIn
Copyright © 2022 GUURU Solutions Ltd.