Shopify Integration Guide
Shopify doesn’t have built-in external form webhooks, but you can embed the opt-in widget via script tag or iframe.Method 1: Script Tag via Theme Editor (Recommended)
Step 1: Add the script
- In your Shopify admin, go to Online Store → Themes
- Click Actions → Edit Code (or the
...menu → Edit Code) - Open
theme.liquidin the Layout folder - Paste your script tag just before
</body>: - Click Save
Step 2: Configure trigger settings
In your Trackly opt-in configuration, set the trigger type (delay, on form submit, or exit intent) to control when the popup appears. The script handles everything automatically.Method 2: Iframe on a Custom Page
- In Shopify admin, go to Online Store → Pages
- Click Add page
- In the page editor, click the
<>(HTML) button to switch to code view - Paste:
- Save and publish the page
Method 3: Shopify Flow + Webhook (for existing Shopify forms)
If you’re collecting phone numbers through Shopify’s native customer registration or checkout:- Install Shopify Flow (free on Shopify Plus, or via the app store)
- Create a new workflow:
- Trigger: Customer created (or Order placed)
- Action: Send HTTP request
- URL:
https://api.tracklysms.com/api/v2/optins/webhook - Method: POST
- Headers:
X-Api-Key: trk_your_api_key_here,Content-Type: application/json - Body:
- Enable the workflow
Universal Methods
These bypass Shopify entirely:- Keyword opt-in: Add “Text JOIN to (555) 555-5555” to product descriptions or your store footer
- QR code: Print on packaging, receipts, or marketing materials
- Subscribe link: Add to your store navigation or post-purchase page