Storylane Docs
PRODUCT RELEASESPLAYBOOKS
  • 👋Welcome to Storylane
  • 📚Storylane Playbooks
  • 🚀Quick Start Guide
    • Planning your Demo
  • ⭐Demo Type Examples
  • 📸RECORDING DEMOS
    • Recording - Overview
    • HTML Demo
    • Screenshot Demo
    • Mobile Demo
  • 💻EDITING DEMOS
    • Guides & Chapters
      • Adding Guided Steps
        • Adding Video Clips
        • Editing Video Clips
      • Customizing Steps
      • AI Assist
      • Chapters & Product Tour
    • Editing Screens
      • Cover, Fit, and Fill
    • Personalization
      • Personalize from Lead Form
      • Personalize from URL params
    • Sandbox Demo
      • Presenter Notes
    • Videos & Voiceovers
    • Demo Settings
      • Convert CTA Button
  • 🎊SHARING DEMOS
    • Sharing - Overview
    • Embed
    • Share Link
    • Via Email Campaigns
      • Share via Gmail Plugin
    • Socials
    • Download
    • Link Security
    • Conference Mode
  • 🌟Lily AI
    • Overview: Meet Lily
    • Lily For Demo Creation 🚀
      • Create & Improve with AI
      • AI Video Avatars
      • AI Voiceovers
      • AI HTML Editor
    • Coming Soon: Lily for Buyer Discovery 🔍
  • 🌐BUYER HUB
    • Buyer Hub Overview
    • Buyer Hub Configuration
    • Buyer Hub Analytics
  • 📈TRACKING AND ANALYSING
    • Lead Capturing
    • Lead Attribution
    • UTM Tracking
    • Account-Level Insights
    • Viewer Data Enrichment
    • Usage Tracking
      • Analyzing Demo Performance
  • 🔗Integrations
    • Integrations
      • HubSpot
        • HubSpot Lead Forms
        • Hubspot Integration Features
        • Hubspot Website Embeds
        • Storylane App for HubSpot
        • Matching HubSpot Tokens to Storylane Tokens
      • Marketo
        • Marketo Lead Forms
      • Pardot
        • Custom Pardot Form
      • Salesforce
        • Storylane App for Salesforce
      • Slack
      • FreshSales
      • Dynamics 365
      • Zapier
      • Google Analytics
      • Gmail
      • Segment
      • Intercom
      • Clearbit
      • SourceForge
      • G2
      • Webhooks
      • Cross-Frame Events
      • External API
  • 🤓Account
    • Managing Demos
    • Managing Team
    • Branding
      • Custom Theme
      • Custom Domain
    • GDPR Compliance
    • SSO
    • FAQs
      • How and Why to use Cookie Tracking?
      • How to capture HTML screens from multiple tabs?
      • How to edit the background of a screen with a pop-up?
      • How to copy a chapter to a demo?
      • How to add pop-up message for non-clickable elements?
      • How to Add/Embed a Storylane Demo in a Zendesk Article
      • Customizing and Tracking Demo URL Links
      • How to combine Desktop and Mobile captures?
      • If I Cancel My Subscription, What Happens To My Demos?
      • What accessibility standards do you support?
      • How to add or subtract a Date & Time token?
      • Why is part of my screen cut off in a demo?
      • How to Install & Connect Storylane via HubSpot Marketplace?
      • How do I send data to 6Sense?
      • Lead Attribution Tracking?
      • How to record a video avatar?
      • How to rearrange folders?
      • Do I need to update my cookie policy if I use Storylane?
      • Is it possible to connect a LinkedIn tracking pixel to Storylane?
Powered by GitBook
On this page
  • Using Storylane Lead Form
  • Using Custom Lead Form
  1. 💻EDITING DEMOS
  2. Personalization

Personalize from Lead Form

PreviousPersonalizationNextPersonalize from URL params

Last updated 7 months ago

Using Storylane Lead Form

When you use Storylane Lead Form, below token variables are automatically created for you.

  • {{email}}, {{first_name}}, {{last_name}}, {{name}}

  • You can use the above tokens in your guided steps to personalize the experience

Try Interactive Demo Yourself 👇

Using Custom Lead Form

If you are using your custom lead form (eg: Hubspot, Marketo, Pardot, etc.), then you will need to pass the form data through a cross-origin message so that tokens can be assigned.

Below is a sample code snippet showing how data will be sent:

// sample code where tokens "first_name" and "last_name" are assigned
window.parent.postMessage({
  message: 'storylane-token-submit',
  payload: {
    token: {first_name: "John", last_name: "Doe"}
  }
},'*');

Example with Hubspot Form:

// sample code where tokens "first_name" and "last_name" are 
// assigned by fetching data from hubspot form

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
   hbspt.forms.create({
    region: "na1",
    portalId: "######",
    formId: "######-######-######-######-######",
       onFormSubmit: function($form) {
           $hs_fname = $form[0].first_name.value;
           $hs_lname = $form[0].last_name.value;
           window.parent.postMessage({
	 	message: 'storylane-token-submit',
		payload: {
		 	token: {first_name: $hs_fname, last_name: $hs_lname}
		}
	   },'*');
       }
  });
</script>

Example with Marketo Form

// sample code where tokens "first_name" and "last_name" are 
// assigned by fetching data from marketo form

<script src="//test.storylane.io/js/forms2/js/forms2.min.js"></script> 
<form id="mktoForm_####"></form> 

<script>
MktoForms2.loadForm("//test.storylane.io", "###-####-####", ####, function(form) {
   // Add an handler 
   form.onSuccess(function(){
         var vals = form.vals();
         window.parent.postMessage({
	 	message: 'storylane-token-submit',
		payload: {
		 	token: {first_name: vals.first_name, last_name: vals.last_name}
		}
	 },'*');
    });
});
</script>