- The first tag loads the script and configures the session
- The second identifies the logged-in user
Show configuration script for Staging
Show configuration script for Staging
Show login script for Staging
Show login script for Staging
Show configuration script for Production
Show configuration script for Production
Show login script for Production
Show login script for Production
{{DL - ...}} with your own GTM Data Layer variables.Adding queuing function (required)
The GTM tag above loadsvoyado.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.
See queuing function stub
See queuing function stub
voyado() calls made anywhere on that page are then safe regardless of the GTM load timing.
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).Category / listing pages
Category / listing pages
Product detail pages
Product detail pages
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