Purpose of This Guide
This guide explains how to install and use the External Tracking Script to record page views and track form submissions on external websites like WordPress, Shopify, Wix, Webflow, or custom HTML.
Use this setup if you:
Embed a Lead Connector form on an external website
Want page views and submissions tracked for attribution
Want to trigger workflows when those events occur
⚠️ External forms are not supported yet. The tracking script only recognizes and tracks internal forms embedded externally.
TABLE OF CONTENTS
- What Is the External Tracking Script?
- Important Behavior Notes
- Why You Need It
- What It Does
- Before You Start
- Step 1: Get Your Tracking Script
- Step 2: Install the Script
- Step 3: Ensure Your Form Is Compatible
- Step 4: View Submissions
- Step 5: Workflow Triggers
- Advanced Troubleshooting
- Example Full Form
- Platform-Specific Installation
- FAQs
What Is the External Tracking Script?
The tracking script is a small piece of JavaScript unique to your account.
When placed on your external site, it:
Records page views
Tracks Lead Connector form submissions embedded on those pages
Stores anonymous activity until the visitor becomes known
Sends those tracked events to your CRM for reporting and workflow automation
It acts as the “bridge” that lets you see page activity from sites that aren’t hosted inside the platform.
Important Behavior Notes
⚠️ No contact or activity log will appear until a Lead Connector form submission occurs.
Here’s what happens:
Page views are anonymous until someone submits a form.
All prior anonymous activity is linked to the created/updated contact
Once a form is submitted, a contact is created or updated in the CRM.
This script does not:
Create contacts from external or custom HTML forms
Track third-party forms (WPForms, Gravity Forms, CF7, Elementor, etc.)
Track interactions or clicks
Track any form inside iframes or popups
Why You Need It
Without the tracking script, we cannot:
Record page views on external websites
Attribute leads or conversions to campaigns
Trigger workflows based on external activity
With the tracking script installed:
You can track our forms on external websites
You can measure page performance in the Attribution Report
You can trigger automations for visitors who submit a form
What It Does
Tracks:
Page views
Form submissions
Workflow triggers (based on above events)
Doesn’t track:
Scrolls, clicks, or time-on-page
Session-level analytics
Cross-domain behavior
Before You Start
The site domain must be connected to your account.
The form must be a Lead Connector form embed
Forms inside iframes or popups won’t be tracked.
Step 1: Get Your Tracking Script
In your account:
Go to Settings → External Tracking
Click Copy Script
Your snippet will look like this:
<script src="https://link.yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"> </script>
Do not modify your data-tracking-id. It’s unique to your account.
Step 2: Install the Script
Paste the script before the closing </body> tag on your website.
Option A: Add Directly (Recommended)
Example:
<!-- External Tracking Script --> <script src="https://link.yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"> </script> </body> </html>
Works for:
Custom HTML sites
WordPress
Wix / Squarespace / Webflow
Option B: Install via Google Tag Manager (GTM)
⚠️ Known Issue: GTM may remove the data-tracking-id attribute, breaking initialization.
If you see console errors like
LC Tracking: Missing data-tracking-id attribute,
your GTM setup is stripping the ID.
Temporary Fix / Workaround:
Create a Custom HTML Tag in GTM.
Paste your full tracking code (do not modify it).
Set trigger to All Pages.
Preview the page, open DevTools → Elements tab.
Verify the data-tracking-id attribute is still present in the script tag.
If it’s missing → install the code manually in your site footer.
Step 3: Ensure Your Form Is Compatible
⚠️ External forms are not supported yet. The tracking script only recognizes and tracks internal forms embedded externally.
Step 4: View Submissions
In the CRM :
Go to Sites → Forms → Submissions
Filter by External Form Name
Submissions appear with a tag:
external form: {form_name}
Step 5: Workflow Triggers
You can automate actions based on:
Page View Trigger: Fires when a visitor views a page with the tracking script even if anonymous. Anonymous activity is stored and later attached to the contact when they submit an LC form.
Form Submission Trigger: Fires when a compatible form is submitted.
Available filters:
Domain
Page path
External form name
UTM parameters (Campaign, Source, Medium, etc.)
Advanced Troubleshooting
1. Enable Debug Mode
Add data-debug="true" to your script:
<script src="https://link.yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" data-debug="true"> </script>
Then open DevTools → Console and check for [LC Tracking] logs.
2. Network Checks
Look for successful 2xx responses.
Ensure no CORS errors appear.
3. Cookie Verification
Go to Application → Cookies
Confirm a session cookie is created.
If missing → browser privacy or third-party restrictions might block it.
4. Common Issues
Example Full Form
<form name="signup"> <label>Email</label> <input type="email" name="email" required /> <label>First Name</label> <input type="text" name="first_name" /> <button type="submit">Submit</button> </form>
Platform-Specific Installation
WordPress
Copy tracking code.
Go to Appearance → Theme Editor → Footer (or use Insert Headers and Footers plugin).
Paste before </body> tag.
Save changes.
Avoid page builders or plugins that replace forms with <div> widgets.
Important for WordPress users
Many WordPress page builders and plugins use non-form elements (such as <div> containers or JavaScript-based widgets) instead of real <form> tags.
Those forms are not compatible with the tracking script for submission tracking.
If your forms do not use real <form> tags:
Page view tracking will still work, but
Form submissions will not sync to your CRM.
To ensure compatibility:
Use plugins that output valid HTML forms (for example, WPForms, Gravity Forms, or Contact Form 7).
Confirm that the form includes <form> and <input type="email"> elements.
Avoid forms inside iframes or popups.
Wix
Go to Settings → Advanced → Custom Code → + Add Custom Code
Paste your script
Set All Pages → Load code on each new page → Place in Body (end)
Apply and publish.
Squarespace
Go to Settings → Advanced → Code Injection
Paste the script in the Header or Footer field
Save and publish.
Shopify
In Shopify Admin → Online Store → Themes → Edit Code
Open theme.liquid
Paste code before </body>
Save.
HubSpot
Go to Settings → Website → Pages → Templates or Site Footer HTML
Paste your script before </body>
Save and publish.
Drupal
Go to Structure → Blocks → Add Block
Paste your script into the block body
Save.
Magento
Follow Magento’s Design Guide for adding third-party JavaScript in the Header or Footer HTML.
Joomla
Go to Extensions → Templates → Templates → index.php
Paste before </body>
Save.
FAQs
Q: Can I see tracking activity inside contact records?
Not unless a form is submitted and the contact is created.
Q: Why aren’t my external forms tracked?
Currently, only Lead Connector embedded forms are supported for tracking.
External custom or third-party forms aren’t captured yet.
Q: Does this handle analytics or attribution reporting?
Yes tracked data appears in the Attribution Report, not in contact timelines or analytics dashboards.
Q: Can I use Google Tag Manager?
You can, but only if the data-tracking-id attribute is preserved. Direct install is recommended.