---
title: "GatedContent lead forms"
slug: "/help/demos/personalize/lead-forms/gatedcontent"
last_updated: "2025-10-24T13:17:39Z"
zendesk_id: 45773436536211
zendesk_url: "https://help.walnut.io/hc/en-us/articles/45773436536211-Embed-a-GatedContent-Lead-Form-in-Your-Demo"
locale: "en-us"
category: "Connect and Optimize"
section: "Track & Identify Demo Viewers"
product: "demos"
topic: "personalize/lead-forms"
displayed_sidebar: "demosSidebar"
sidebar_position: 2
tags: ["lead forms","embed lead forms","gatedcontent"]
---

## **Overview**

Use this setup guide to embed your **GatedContent lead forms** directly in your Walnut demos. This setup enables Walnut to automatically capture **email** **identification**, and sync it across your integrations and analytics for deeper engagement tracking.

Once configured, your GatedContent form displays **seamlessly inside the demo**, and each submission **identifies the viewer in Walnut Insights** for enriched session and lead reporting.

---

### **Setup at a Glance**

1.  **Copy the [starter script](#h_01K8B2MQ3803FMZTETP50MJ1B6)** provided below.
2.  **Paste the starter script** into the Embed Code section of your template.  
    (Template → Forms → Create Lead Form → Embed code)
1.  [**Insert your unique GatedContent snippet and gate ID**](#h_01K8998TZVPDME59558VT8JR6Z) where indicated.
2.  **Save your form** and **publish your demo.**

:::note[🧩 Important Note]

Unlike [**HubSpot**](/help/integrations/hubspot/lead-forms), [**Marketo**](/help/integrations/marketo/lead-forms), or [**Pardot**](/help/integrations/pardot/lead-forms) forms, which are supported out of the box, **GatedContent forms** require a lightweight **custom script configuration** to connect with Walnut.

:::

---

## **Configure Your Form Script**

### **Step 1: Copy & Paste the Starter Script in Your Walnut Template**

Copy the following starter script and paste it into the **Embed** **code** section of the **Forms** panel of your template. (**Template → Forms → Create Lead Form → Embed code).**

![Screenshot 2025-10-24 at 8.19.31 AM.png](pathname:///images/560b620574f14a4b.png)

_\* This starter script acts as the framework for your GatedContent form integration with Walnut._ _You’ll insert your own GatedContent code snippet and gate ID into the indicated sections._

---

### GatedContent Starter Script

Copy

```




/* ---------------------------------------------------------------------------
   STEP 3b: Add your Gate ID below. Replace the Xs with your unique Gate ID 👇
   --------------------------------------------------------------------------- */  

<div></div>
```

---

### **Step 2: Locate Your GatedContent Form Snippet**

-   Your GatedContent form snippet should look something like this:

```auto


<div class='gate-00000000-0000-0000-0000-00000000d000'></div>`      
```

---

### **Step 3: Insert Your Unique GatedContent Code into the Starter Script**

1.  **Copy** the code between your `` tags in your unique **GatedContent** snippet. (\*_Do not include the  tags themselves._)
2.  **Paste** that portion into the **STEP 3a** section of the **starter script** in your Walnut template.  
    
    **Paste your code below the line that says:**  
    // ↓↓↓ Paste your GatedContent script below this line ↓↓↓
    
3.  **Copy** **your** **Gate ID** (for example, `gate-00a0dc0c-00de-000f-afc0-0e000000d000`) and **replace** the placeholder Gate ID in the final `<div>` line of the starter script.  
    
    **This section is labeled STEP 3b: “Add your Gate ID below. Replace the Xs with your unique Gate ID 👇”.**
    
4.  **That's it! Finish configuring your form in the Forms panel** — adjusting options such as settings, placement, and autoclose behavior as needed for your demo.
5.  Once configured, **save your changes** and **publish a demo** to test your form.
    

---

:::note

**⚠️ Important Note:  
Always test your form in a published demo**, not within the template editor.  
GatedContent forms **do not appear in template preview**, and submission events will only trigger in the published demo environment.

:::

---

### **Step 4: Test Your Form Setup**

Once your script and Gate ID are in place, you’re ready to test your form submissions.

1.  **Publish** a demo containing the form.
2.  **Open the published demo in an incognito or private window** and submit a test entry through your GatedContent form.
3.  **Verify** that the form submission is successful and check **Walnut → Insights → Demo → Sessions of this demo** to confirm that the email submission is captured.

![Screenshot 2025-10-23 at 4.06.34 PM.png](pathname:///images/5e7eb2fd8b1cb03d.png)

:::note[Note]

Form submissions use browser cookies to recognize returning users. If a form has already been submitted, it will not appear again for that viewer unless the browser cache or cookies are cleared. For accurate testing, use an incognito window or clear your cache between test submissions.

:::

---
