Google Tag Manager

Integrate Google Tag Manager (GTM) with your Storylane demos - you can track user interactions, pass event data to platforms like Google Analytics, and improve demo attribution.

How to Integrate:

  • Go to the integrations page in the Storylane Dashboard.

  • Navigate to the Google Tag Manager integration, and click 'Connect'

  • Enter your Google Tag Manager Container ID in the field (see the screenshot below)

  • Once finished, the status will change to 'Connected'

  • If you want to make any change to the container ID, or uninstall the integration, just click on the settings icon.

Below are the events you will receive in GTM

To verify the Integration . We recommend you install Google Tag Assistant to verify the events coming from your page.

Demo opened - sent when the demo is opened

// Some code
dataLayer.push({
  event: "sl_demo_open",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 24
})

Lead captured - sent when a lead is captured or identified

// Some code
dataLayer.push({
  event: "sl_lead_identify",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  email: "[email protected]",
  gtm.uniqueEventId: 28
})

Demo Engaged (10, 25, 50, 75, 100) - sent on demo engagement. These events are triggered when user either spends 10 seconds or finishes 10 percent of demo (whichever comes first) . They are also sent similarly at 25, 50, 75 and 100 intervals

dataLayer.push({
  event: "sl_10_demo_engaged",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  seconds_spent: 5,
  percent_viewed: 10,
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 56
})

dataLayer.push({
  event: "sl_25_demo_engaged",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  seconds_spent: 13,
  percent_viewed: 25,
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 64
})

dataLayer.push({
  event: "sl_50_demo_engaged",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  seconds_spent: 50,
  percent_viewed: 40,
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 77
})

dataLayer.push({
  event: "sl_75_demo_engaged",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  seconds_spent: 66,
  percent_viewed: 75,
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 84
})

dataLayer.push({
  event: "sl_100_demo_engaged",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  seconds_spent: 80,
  percent_viewed: 100,
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 101
})

Demo CTA clicked - sent when a user clicks a CTA button and is directed to an external URL

// Some code
dataLayer.push({
  event: "sl_open_external_url",
  demo_id: "ie9jadfjhdku",
  demo_name: "Storylane Overview (homepage)",
  demo_url: "https://app.storylane.io/share/ie9jadfjhdku",
  step_id: "b904fd92-e84d-4041-8aea-64aec3eb0b55",
  step_index: 0,
  chapter_id: "73eb3b80-fce0-4ad3-9807-894b10a59fc7",
  chapter_name: "Add Guides to Navigate Buyers",
  ext_url: "https://www.storylane.io/request-demo?utm_source=website&utm_medium=solutions-page&utm_campaign=homepage",
  referrer: "https://www.google.com",
  host_url: "https://www.storylane.io",
  gtm.uniqueEventId: 112
})


GTM Tag setup to track conversion

Step 1: Tag setup

  1. Go to Tags > New

  2. Choose tag type:

    • GA4 Event

    • Custom HTML (for advanced needs)

  3. Name your tag (e.g., Demo Open Conversion)

  4. Set parameters (e.g., Event Name: demo_open)

  5. Attach your trigger (created in Step 3)

Step 2: Create a Trigger

Setting
Example

Type

Custom Event

Event Name

sl_demo_open

Optional Filter

Page URL contains storylane.io


Step 3: Add Data Layer Variables (Optional but powerful)

Use this to track things like demo ID or name for more granular data.

Variable Type
Key
Recommended Name

Data Layer Variable

demo_id

DLV - demo_id

Data Layer Variable

demo_name

DLV - demo_name


View Interactive Demo Setup

Still need help? Reach out to [email protected] & we will be happy to assist!

Last updated