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

# Bigcommerce

# BigCommerce Integration Guide

BigCommerce supports custom scripts via Script Manager — no app required.

## Method 1: Script Manager (Recommended)

### Step 1: Add the script

1. In your BigCommerce admin, go to **Storefront → Script Manager**
2. Click **Create a Script**
3. Configure:
   * **Name**: Trackly SMS Opt-in
   * **Placement**: Footer
   * **Location**: All Pages (or specific pages)
   * **Script Category**: Essential
   * **Script Type**: Script URL
   * **Script URL**: `https://api.tracklysms.com/optin/script.js?token=YOUR_PUBLIC_TOKEN`
4. Click **Save**

The opt-in widget will now appear on your store pages based on your trigger settings (delay, exit intent, or scroll).

## Method 2: Iframe Embed

1. Go to **Storefront → Web Pages** or edit a page in your theme
2. Switch to HTML mode in the editor
3. 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: Webhooks (for checkout/registration forms)

BigCommerce has native webhook support for customer events:

1. Go to **Settings → API → Webhooks** (or use the BigCommerce API)
2. Create a webhook:
   * **Event**: `store/customer/created`
   * **Destination**: `https://api.tracklysms.com/api/v2/optins/webhook`
   * **Headers**: `X-Api-Key: trk_your_api_key_here`

Note: BigCommerce webhooks send event notifications, not form data directly. You may need a middleware (Zapier or a simple Cloud Function) to transform the payload into Trackly's webhook format.

## Universal Methods

* **Keyword opt-in**: Add "Text JOIN to (555) 555-5555" to your store footer or product pages
* **QR code**: Include in shipping inserts or packaging
* **Subscribe link**: Add to your navigation or post-purchase page
