> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracklysms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Leadpages

# Leadpages Integration Guide

Leadpages forms require Zapier or a third-party integration to POST externally.

## Method 1: Zapier Webhook

### Step 1: Create your form in Leadpages

1. In the Leadpages Builder, add or edit your opt-in form
2. Add fields: Phone Number (required), First Name, Last Name
3. Include TCPA consent language in your page text or as a checkbox

### Step 2: Connect to Zapier

1. In Leadpages, go to your page's **Integrations** tab
2. Connect **Zapier** as your form integration
3. In Zapier, create a new Zap:
   * **Trigger**: Leadpages → New Lead
   * **Action**: Webhooks by Zapier → POST
4. Configure the webhook action:
   * **URL**: `https://api.tracklysms.com/api/v2/optins/webhook`
   * **Payload Type**: JSON
   * **Headers**: `X-Api-Key: trk_your_api_key_here`
   * **Data**:
     * `phone_number`: map to your phone field
     * `list_id`: your Trackly sending list ID (integer)
     * `consent_text`: your TCPA consent language
     * `first_name`: map to first name field
     * `last_name`: map to last name field
5. Test and enable the Zap

## Method 2: Iframe Embed (No Zapier needed)

1. In the Leadpages Builder, add an **HTML** widget
2. Paste:
   ```html theme={null}
   <iframe src="https://api.tracklysms.com/optin/page/YOUR_PUBLIC_TOKEN" width="100%" height="520" frameborder="0" style="border:none;max-width:480px;margin:0 auto;display:block;"></iframe>
   ```
3. Replace `YOUR_PUBLIC_TOKEN` with your opt-in configuration's public token

## Method 3: Script Tag

1. Go to your page's **Settings → Analytics** (or use the HTML widget)
2. Add to the **Head Tracking Code** or **End Body Tag** section:
   ```html theme={null}
   <script src="https://api.tracklysms.com/optin/script.js?token=YOUR_PUBLIC_TOKEN" async></script>
   ```

## Method 4: Subscribe Link

Add a button that links to `https://api.tracklysms.com/s/<your-slug>` — mobile visitors go to their SMS app, desktop visitors see a web form.
