> ## 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.

# Clickfunnels

# ClickFunnels Integration Guide

ClickFunnels has native webhook support — it can POST form data directly to Trackly.

## Method 1: Native Webhook (Recommended)

### Step 1: Create your funnel page form

1. In the ClickFunnels page editor, add or configure your opt-in form
2. Include fields for: Phone Number (required), First Name, Last Name

### Step 2: Configure the webhook

1. Go to your funnel step **Settings**
2. Click **Integrations → Webhook**
3. Set the **Webhook URL** to:
   ```
   https://api.tracklysms.com/api/v2/optins/webhook
   ```

### Step 3: Add API key via custom headers

In ClickFunnels webhook settings, add a custom header:

* **Header Name**: `X-Api-Key`
* **Header Value**: `trk_your_api_key_here`

### Step 4: Hidden fields for required data

Add hidden fields to your form to include data Trackly needs:

* **list\_id**: your Trackly sending list ID (integer)
* **consent\_text**: your TCPA consent language (e.g., "By signing up, you agree to receive SMS marketing messages. Msg & data rates may apply. Reply STOP to unsubscribe.")

### Step 5: Field mapping

ClickFunnels sends form field names as-is. Use these field names in your form:

* `phone` or `phone_number` → maps to phoneNumber
* `first_name` → maps to firstName
* `last_name` → maps to lastName
* `email` → passed through

Trackly accepts flexible field names, so ClickFunnels' default naming conventions work without custom mapping.

### Step 6: Test

Publish your funnel, submit a test entry, and verify the contact appears in your Trackly sending list.

## Method 2: Iframe Embed

1. Add a **Custom HTML** element to your funnel page
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>
   ```

## Method 3: Script Tag

1. Go to your funnel page **Settings → Tracking Code → Footer Code**
2. Paste:
   ```html theme={null}
   <script src="https://api.tracklysms.com/optin/script.js?token=YOUR_PUBLIC_TOKEN" async></script>
   ```
