Skip to main content Link Search Menu Expand Document (external link)

Guides headless

If you are using headless, you will need to add this script to your site:

<script type="text/javascript" src="https://headless.dialogtrail.com/static/sdk.js?id=YOUR_COMPANY_ID"></script>

When you want to init the product guide through the SDK, you run window.DT.initProductGuide(GUIDE_UUID, { lang: LANGUAGE(as a language code eg. en), }). To listen to the events you do this:

window.DT.subscribe('product_guide', (e) => {
    switch (e.type) {
      case 'product_guide_step':
        /* -- handle the event -- */
        break;
      case 'product_guide_products':
        /* -- handle the event -- */
        break;
    }
  });

What can I do with headless

Here you can see the events you will receive and what they contain. Here you can see what events you can send to us.


Table of contents