Skip to main content
This feature is in beta. This means it might at any time be changed, withdrawn from your account, or become part of a paid add-on module. You might also experience interruptions of this service, degradation of user experience or faulty behavior even in critical processes such as automations and sendouts. Voyado welcomes feedback on beta features, and encourages you to try them, but you should not build business critical logic on beta features. Only when a feature reaches its full release can you trust it to function reliably with no further breaking changes.
To install the script, start by creating two Custom HTML tags in GTM that both fire on All Pages.
  • The first tag loads the script and configures the session
  • The second identifies the logged-in user
Use whatever script URL matches your target environment (see Environments above):
Here, replace {{DL - ...}} with your own GTM Data Layer variables.
All calls to voyado() made before the script finishes loading are queued and replayed automatically when the script is ready, so tag ordering here is not critical.

Adding queuing function (required)

The GTM tag above loads voyado.js asynchronously. This means your page code may call voyado('load-widgets', ...) before the script has finished loading, resulting in a ReferenceError: voyado is not defined. To prevent this, add the following minimal stub to your <head> before the GTM snippet. This creates a queuing function that captures any calls made before voyado.js arrives, which the SDK replays automatically on bootstrap.
This is a one-time addition to your page template. All voyado() calls made anywhere on that page are then safe regardless of the GTM load timing.
GTM’s own initialization snippet (i[r]=i[r]||function()...) performs the same setup but only after gtm.js has downloaded. The stub above runs synchronously during HTML parsing, before any network requests, closing the race window.

Load widgets

Create additional Custom HTML tags for each page type. Fire them on the appropriate triggers (for example a DOM Ready trigger filtered by the page path).
Either the Badge widget or the Add Review widget (“badge” and “reviews” in the list above) - or both of them - must be present on product detail pages.
Only list the widget types whose HTML containers actually exist on the current page.

SPA route changes (if applicable)

If your site is a SPA (Single Page Application) then create a tag that fires on your virtual page-view trigger:
Single Page Application