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

# Wix

# Wix Integration Guide

Wix has built-in automations that can POST form data directly to Trackly — no Zapier needed.

## Method 1: Wix Automations + Form (Recommended)

### Step 1: Create a form

1. In Wix Editor, add a **Wix Forms** element to your page
2. Add fields: Phone Number (required), First Name, Last Name
3. Add a consent checkbox with TCPA language: "I agree to receive SMS marketing messages from \[Brand]. Msg & data rates may apply. Reply STOP to unsubscribe."

### Step 2: Set up the automation

1. Go to **Automations** in your Wix dashboard (or CRM → Automations)
2. Click **+ New Automation**
3. Trigger: **Wix Forms → Form submitted** → select your form
4. Action: **Send an HTTP request**
5. Configure:
   * **URL**: `https://api.tracklysms.com/api/v2/optins/webhook`
   * **Method**: POST
   * **Headers**: Add `X-Api-Key` with your Trackly API key, and `Content-Type: application/json`
   * **Body** (JSON):
     ```json theme={null}
     {
       "phone_number": "{{phone field}}",
       "list_id": YOUR_LIST_ID,
       "consent_text": "I agree to receive SMS marketing messages. Msg & data rates may apply. Reply STOP to unsubscribe.",
       "first_name": "{{first name field}}",
       "last_name": "{{last name field}}"
     }
     ```
6. Replace `{{phone field}}` etc. with the dynamic field insertions from your form
7. Replace `YOUR_LIST_ID` with your actual Trackly sending list ID

### Step 3: Test

Submit the form yourself with your own phone number and verify the contact appears in your Trackly sending list.

## Method 2: Iframe Embed

1. In Wix Editor, add an **HTML iframe** element (found under Embed → Custom Embeds → Embed a Widget)
2. Click "Enter Code" and paste:
   ```html theme={null}
   <iframe src="https://api.tracklysms.com/optin/page/YOUR_PUBLIC_TOKEN" width="100%" height="520" frameborder="0" style="border:none;"></iframe>
   ```
3. Resize the element to fit your page layout

## Method 3: Script Tag

1. Go to **Settings → Custom Code** (requires Premium plan)
2. Click **+ Add Custom Code**
3. Paste your script tag, set it to load on **All pages** in the **Body - end** position:
   ```html theme={null}
   <script src="https://api.tracklysms.com/optin/script.js?token=YOUR_PUBLIC_TOKEN" async></script>
   ```
