company logo

Help Center

Go to Aesthetix CRM
Terms & ConditionsPrivacy Policy
All collectionsReportingSite and Traffic AnalyticsExternal Form and Page View Tracking

External Form and Page View Tracking

Install the External Tracking Script to capture page views and form submissions on websites outside Aesthetix CRM, and trigger workflows from that activity.

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.

What the tracking script does

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.

Who should use this

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.

How the tracking behaves

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

What it tracks and what it skips

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 you start

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.

Step 1: Get your tracking script

  1. Go to Settings > External Tracking

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

Step 2: Install the script on your site

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.

Step 3: Confirm your form is compatible

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>

Step 4: Understand custom field capture

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:

  1. The field's name attribute matches a CRM property or custom field key

  2. The field's label matches a CRM display name

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

Step 5: View tracked submissions

To review what's been captured:

  1. Go to Sites > Forms > Submissions

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

Step 6: Trigger workflows from tracked activity

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.

Step 7: View your external tracking analytics

Once the script has been live for a while, you can review its activity in a dedicated analytics dashboard instead of piecing performance together from the raw submissions list.

  1. Go to Settings > External Tracking

  2. Click Analytics

The Analytics button only appears once a tracking script is installed and connected on at least one page. If activity was already flowing before you open it, give it a few minutes to catch up after your most recent visit or submission.

Dashboard overview. At the top of the dashboard you'll see:

  • Total Page Views

  • Total Form Views

  • Responses

  • Completion Rate

  • Average Time on Page

  • Exit Before 30s, a bounce-style metric for visitors who leave within the first 30 seconds

Trends over time. Use the date range selector to pick a reporting period, then view line charts with daily breakdowns for page views, form views, responses, and completion rate. Filter by domain, page, or form to isolate a specific landing page, compare form performance across pages, or spot an underperforming asset.

Audience and traffic. The dashboard also breaks visitors down by device type (desktop, tablet, mobile), top browsers, and aggregated geographic data down to country, state, and city, so you can see where the traffic behind your external pages is actually coming from.

Form-level detail. For each tracked form you can see its own Total Views, Responses, and Completion Rate, along with a last-updated timestamp, useful when you're auditing which of several landing-page forms is actually converting.

Advanced troubleshooting

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 <form> tag and an email input both exist on the page

Tracking ID appears missing

Check whether a tag manager stripped the data-tracking-id attribute

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.

Frequently Asked Questions

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.

Is there a dashboard to see this tracking activity at a glance, instead of just the submissions list? Yes. Go to Settings > External Tracking and click Analytics to open a dashboard with page views, form views, responses, and completion rate for your tracked domains, pages, and forms, plus audience and device breakdowns.

What is the difference between Form Views and Responses in the analytics dashboard? Form Views counts how many times a tracked form was seen. Responses counts how many of those views turned into an actual submission.

How is Completion Rate calculated? Completion Rate is the percentage of form views that ended in a submission, Responses divided by Form Views.

What does Exit Before 30s mean? It's the share of visitors who leave a tracked page within 30 seconds of arriving, similar to a bounce rate.

Can I filter the analytics dashboard by a specific domain, page, or form? Yes. The dashboard's filters let you isolate a domain, landing page, or form, and the date range selector lets you compare performance across different reporting periods.

Can the analytics dashboard show me where my traffic is coming from? Yes. It breaks traffic down by device type, browser, and aggregated location data (country, state, and city) in addition to the page and form metrics.

Did this answer your question?
😞
😐
😁