If your practice runs a website or landing pages outside Aesthetix CRM (WordPress, Shopify, Wix, Webflow, or a custom HTML site), the External Tracking Script lets you capture visitor page views and track form submissions on that external site, then feed the activity back into your account for attribution reporting and automation. You install it once under Settings > External Tracking.
The External Tracking Script is a unique JavaScript snippet generated for your account. Once it's installed on an external website, it:
Records page views
Tracks compatible form submissions
Captures mapped custom field values
Stores anonymous visitor activity before a form is submitted
Sends tracked events into Aesthetix CRM for reporting and automation
It's the bridge between an external website and your CRM: without it, activity on pages you don't host inside Aesthetix CRM never reaches your contact records or attribution reports.
Use the External Tracking Script if you:
Embed an Aesthetix CRM form on a website hosted elsewhere
Use a standard HTML <form> on that site (not an iframe or embedded widget)
Want page views on that external site counted toward attribution
Want workflows to fire when a visitor submits that form
It will not work for iframe-based or widget-based third-party forms. The form has to exist directly in the page's DOM as a real HTML <form> element for tracking to pick it up.
No contact or activity record appears in Aesthetix CRM until a form is actually submitted. Here's the sequence:
Page views are tracked anonymously as visitors browse
That anonymous activity is stored in the visitor's browser
Once a form is submitted, a contact is created or updated, and the previous anonymous activity is attached to that contact
The script does not:
Create contacts from iframe-based or widget-based forms
Track scroll depth, clicks, or general session analytics
Capture hidden or disabled fields unless you've explicitly configured that field to be captured
Tracked | Not tracked |
|---|---|
Page views | Scroll behavior |
Compatible form submissions | Click events |
Workflow triggers based on those events | Time-on-page |
Cross-domain session analytics |
Before installing the script, confirm two things:
Your website domain is connected to your Aesthetix CRM account
Your form is either an embedded Aesthetix CRM form or a standard HTML <form> rendered directly on the page
Forms inside iframes, popups, or JavaScript widgets will not be tracked no matter how the script is installed.
Go to Settings > External Tracking
Click Copy Script
Your snippet will look similar to this:
<script src="https://yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></script>Do not modify the data-tracking-id value. It's unique to your account and is how tracked activity gets matched back to your CRM.
Paste the script right before the closing </body> tag on your website:
<script src="https://yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></script>
</body>
</html>This installation works on custom HTML sites, WordPress, Wix, Squarespace, Shopify, and Webflow.
Installing through a tag manager instead? Use a Custom HTML tag, paste the full script without editing it, and set the trigger to fire on all pages. After publishing, double-check that the data-tracking-id attribute is still intact. Some tag managers strip custom attributes from script tags; if that happens, install the script manually in your site's footer template instead.
Supported forms are embedded Aesthetix CRM forms or standard HTML forms rendered directly in the page's DOM. For tracking to actually capture a submission:
A real <form> tag must exist on the page
Fields must be visible (not hidden or disabled)
Fields must have valid name attributes
An email field must be present
Forms inside iframes, popup overlays, or third-party widgets that don't render real HTML inputs are not supported, and won't create or update a contact even if a patient fills them out.
Example of a compatible form structure:
<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>The tracking script captures more than just name and email. Supported field types include text fields, text areas, dropdowns (single and multi-select), checkboxes, radio buttons, number fields, date pickers, ratings, and file uploads (metadata only, the file itself is not stored).
A field is only captured if it's visible on the page and has a valid name attribute. Hidden or disabled fields are ignored unless you've configured otherwise.
Captured fields are mapped to your CRM using this priority order:
The field's name attribute matches a CRM property or custom field key
The field's label matches a CRM display name
The field's name matches the label text (case-insensitive)
If none of those match, the value is stored as unmapped_field so you don't lose the data, even if it isn't mapped to a specific property yet.
To review what's been captured:
Go to Sites > Forms > Submissions
Filter by External Form Name
Submissions from external forms are tagged as external form: {form_name} so you can tell them apart from forms built and hosted directly inside Aesthetix CRM. For help building and managing forms themselves, see the Forms collection.
Once the script is capturing activity, you can build workflow automations off of two trigger types:
Page View Trigger: Fires when a visitor views a page containing the tracking script. Because this activity starts out anonymous, it's stored and linked to a contact retroactively once that visitor eventually submits a form.
Form Submission Trigger: Fires when a compatible form is submitted. You can filter this trigger by domain, page path, external form name, UTM source, UTM medium, and UTM campaign, which makes it useful for routing leads from a specific landing page or campaign straight into a nurture workflow. See the Workflows collection for how to build out the automation itself once the trigger fires.
Page views and form submissions captured this way also feed into your attribution reporting, so campaigns driving traffic to external pages get proper credit alongside traffic to pages built inside Aesthetix CRM.
Enable debug mode. Add data-debug="true" to your script tag:
<script src="https://yourdomain.com/js/external-tracking.js" data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" data-debug="true"></script>Then open your browser's Developer Tools and check the Console tab for tracking logs.
Check the network tab. Look for successful 2xx responses from the tracking script's requests, and confirm there are no CORS errors blocking them.
Verify cookies. In Developer Tools, check Application > Cookies to confirm a session cookie exists. If it's missing, the visitor's browser privacy settings may be blocking the tracking script.
Common issues:
Symptom | Likely cause |
|---|---|
No console logs appear | Confirm script placement and enable debug mode to see activity |
Form isn't being tracked | Confirm a real |
Tracking ID appears missing | Check whether a tag manager stripped the |
If you've worked through these steps and tracking still isn't working, have your website URL, a screenshot of the form's HTML, a screenshot of your External Tracking settings, and any console log output ready before reaching out for further help.
Can custom fields be captured from external forms? Yes. Supported custom field types are captured and mapped automatically as long as the field is visible and has a valid name attribute.
Are third-party forms supported?
Only if they render real HTML <form> inputs directly in the page's DOM. Iframe-based or widget-based forms are not supported.
Are uploaded files actually stored? No. Only file metadata is captured, not the file itself.
Will this affect my attribution reporting? Yes. Page views and form submissions tracked through the script contribute to attribution reporting and can trigger workflows, the same as activity on pages hosted inside Aesthetix CRM.
Why aren't page views showing up yet? Page views are stored anonymously in the visitor's browser and only get linked to a contact record once that visitor submits a form.
Does the tracking script work with popup forms or iframe embeds?
No. The form has to be a real HTML <form> element rendered directly on the page. Popups, overlays, and iframe-embedded forms are not compatible.
Can I install the script through a tag manager?
Yes, using a Custom HTML tag triggered on all pages. Just verify after publishing that the data-tracking-id attribute wasn't stripped, since some tag managers remove custom attributes.
Does this track scroll depth or time on page? No. The script only tracks page views and compatible form submissions. It does not track scroll behavior, clicks, time-on-page, or cross-domain session analytics.
Where do I find the tracking script for my account? Go to Settings > External Tracking and click Copy Script. Do not edit the tracking ID in the snippet, since it's what ties tracked activity back to your account.
Where can I see submissions once the script is live? Go to Sites > Forms > Submissions and filter by External Form Name. Each submission is tagged with the external form's name so you can separate it from forms hosted directly in Aesthetix CRM.