# Marketo

* Sync demo data with existing leads.
* Automatically create new leads if they don’t exist.
* Log demo session activity on the Marketo timeline.
* Capture leads directly via Marketo forms.

{% hint style="warning" %}
You must have **admin** level permissions to connect any integrations within Storylane
{% endhint %}

Follow these step-by-step instructions to set up the integration:

***

## **Step 1: Add the Storylane Code to Your Website (Optional)** <a href="#step-1-add-the-storylane-code-to-your-website-optional" id="step-1-add-the-storylane-code-to-your-website-optional"></a>

This step enables lead attribution tracking. Add the following code snippet to the `<head>` tag of your website:

```javascript
(function(){"use strict";function e(t){const r=t.head;if(!r)return;const i=t.querySelector('script[src="https://js.storylane.io/js/v2/storylane.js"]'),n=t.querySelector('script[src="https://js.storylane.io/js/v1/storylane.js"]');if(i||n)return;const s=t.createElement("script");s.type="text/javascript",s.async=!0,s.src="https://js.storylane.io/js/v2/storylane.js",r.appendChild(s)}e(window.document)})();
```

> 💡 Learn more about lead attribution [here](https://docs.storylane.io/storylane-knowledge-base/tracking-and-analysing/lead-attribution).

***

## **Step 2: Connect Marketo with Storylane**

{% @storylane/embed subdomain="app" linkValue="4qiydc3vwvzz" url="<https://app.storylane.io/share/4qiydc3vwvzz>" %}

1. Access the **Marketo Integration** section in your Storylane dashboard under **Settings > Integrations**.
2. Click the **Connect** button.
3. **Prepare for Integration:**
   * Ensure you have **1 free Custom Activity** available (required).
   * Assign the correct API user during setup. The user must have the following permissions:
     * Read-Write Activity
     * Read-Write Activity Metadata
     * Read-Write Person
     * Read-Write Schema Custom Field
     * Read-Write Schema Standard Field
4. **Configure Marketo:**
   * Support will provide a secure URL for configuration.
   * Open the URL and click **Configure Marketo.**
   * Enter the required credentials:
     * Client ID
     * Client Secret
     * Endpoint URL
     * Identity URL

***

### **What Data Does Storylane Sync to Marketo?**

{% hint style="warning" %}
⚠️ *Important:* Do not manually create lead fields in Marketo. Storylane automatically creates the necessary fields with the correct API names when you connect your account. Manual creation may result in broken integrations.
{% endhint %}

#### **Custom Properties**

Storylane automatically syncs demo data to Marketo under custom fields. Here's the data included:

Here’s a reference showing how this data appears for your lead in Marketo.

<table><thead><tr><th width="233.88629150390625">Property Name</th><th width="127.7117919921875">Applies To</th><th width="257.775146484375">Description</th><th width="114.95501708984375">Data Type</th></tr></thead><tbody><tr><td><strong>Storylane Sessions</strong></td><td>Demo + Hub</td><td>Total number of sessions (applies to both single demos and Hubs)</td><td>Integer</td></tr><tr><td><strong>Storylane Demo Name</strong></td><td>Demo</td><td>Name of the most recently viewed demo</td><td>String</td></tr><tr><td><strong>Storylane Demo Viewed At</strong></td><td>Demo</td><td>Timestamp of the most recent demo view</td><td>DateTime</td></tr><tr><td><strong>Storylane Demo Time (secs)</strong></td><td>Demo</td><td>Time spent viewing the demo (seconds)</td><td>Number</td></tr><tr><td><strong>Storylane Demo Complete (%)</strong></td><td>Demo</td><td>Percentage of demo steps completed</td><td>Number</td></tr><tr><td><strong>Storylane Demo Link</strong></td><td>Demo</td><td>Link to the demo</td><td>String</td></tr><tr><td><strong>Storylane CTA Clicked</strong></td><td>Demo + Hub</td><td>CTA URL clicked</td><td>String</td></tr><tr><td><strong>Storylane Demo Session Link</strong></td><td>Demo</td><td>Link to the specific demo audience session</td><td>String</td></tr><tr><td><strong>Storylane Buying Intent</strong></td><td><strong>Demo + Hub</strong></td><td>Engagement-based intent level (Low / Medium / High)</td><td>String</td></tr><tr><td><strong>Storylane Lead Source</strong></td><td><strong>Demo + Hub</strong></td><td>How the viewer was sourced (e.g. Nurtured, Inbound, Sales)</td><td>String</td></tr><tr><td><strong>Storylane Hub Name</strong></td><td>Hub</td><td>Name of the Hub that was viewed</td><td>String</td></tr><tr><td><strong>Storylane Hub Link</strong></td><td>Hub</td><td>Link to the Hub</td><td>String</td></tr><tr><td><strong>Storylane Hub Viewed At</strong></td><td>Hub</td><td>Timestamp of the most recent Hub view</td><td>DateTime</td></tr><tr><td><strong>Storylane Hub Viewed Content (%)</strong></td><td>Hub</td><td>Percentage of Hub content viewed</td><td>Number</td></tr><tr><td><strong>Storylane Hub Time (secs)</strong></td><td>Hub</td><td>Total time spent in the Hub (seconds)</td><td>Number</td></tr></tbody></table>

<figure><img src="https://2431356420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN8hWd9k2Pbb6YSWO4pUQ%2Fuploads%2F9jdXxNNbtPnMoUbSNGeP%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%252FN8hWd9k2Pbb6YSWO4pUQ%252Fuploads%252FrJcEaejMGI7eT3WfnFUM%252Fandy__sur_-_Storylane_-_118_new_items_-_Slack.avif?alt=media&#x26;token=0406ce1f-1088-4dd2-a157-8f07239e336c" alt=""><figcaption></figcaption></figure>

***

#### **Custom Activities**

Each demo session creates a custom activity in Marketo. This includes detailed demo engagement data for the lead.

Here’s a reference showing how this activity looks in Marketo.

<figure><img src="https://2431356420-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FN8hWd9k2Pbb6YSWO4pUQ%2Fuploads%2F0LYgen61xM0YcmM8NZ2J%2Fhttps___files.gitbook.com_v0_b_gitbook-x-prod.appspot.com_o_spaces%252FN8hWd9k2Pbb6YSWO4pUQ%252Fuploads%252FAm8WJascj7UAKhPvKGzp%252Fandy__sur_-_Storylane_-_121_new_items_-_Slack.avif?alt=media&#x26;token=84ff526c-daf1-417e-94f0-0e7fa2432e98" alt=""><figcaption></figcaption></figure>

***

By following these steps, you can integrate Storylane with Marketo to enhance lead tracking and demo engagement insights effortlessly.
