Articles in this section

Tracking External Forms with Enrollio

Tracking External Forms with Enrollio

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 Wix, Webflow, or custom HTML sites. Use this setup if you:

  • Embed an Enrollio form on an external website
  • Use a standard HTML form (not iframe-based)
  • Want page views and submissions tracked for attribution
  • Want to trigger automations when those events occur

⚠️ Important: Iframe-based or widget-based third-party forms are not supported. Forms must exist directly in the page code and use valid HTML <form> elements.

[SCREENSHOT: Settings → External Tracking overview showing where to access the tracking script]

What Is the External Tracking Script?

The tracking script is a small piece of JavaScript unique to your Enrollio account. When placed on your external site, it:

  • Records page views from prospective families
  • Tracks compatible form submissions
  • Captures mapped custom field values
  • Stores anonymous activity until the visitor becomes known
  • Sends tracked events to your CRM for reporting and automation

Think of it as the bridge that lets you see activity from sites not hosted inside Enrollio.

Important Behavior Notes

⚠️ No parent record or activity log will appear until a form submission occurs. Here's how it works:

  1. Page views are tracked anonymously
  2. Anonymous activity is stored in the browser
  3. Once a form is submitted:
    • A parent/family record is created or updated
    • All prior activity is linked to that record

This script does not:

  • Create parent records from iframe-based or widget-based forms
  • Track interactions like clicks or scrolls
  • Track session analytics or cross-domain behavior
  • Capture hidden or disabled form fields (unless explicitly configured)

Why You Need It

Without the tracking script, Enrollio cannot:

  • Record page views on external websites
  • Attribute enrollments or tour bookings to campaigns
  • Trigger automations based on external activity

With the tracking script installed:

  • You can track your forms on external websites
  • You can measure page performance in the Attribution Report
  • You can trigger automations for families who submit a form

What It Tracks

Tracks:

  • Page views
  • Form submissions
  • Automation triggers (based on above events)

Doesn't track:

  • Scrolls, clicks, or time-on-page
  • Session-level analytics
  • Cross-domain behavior

Before You Start

Make sure:

  • The site domain is connected to your Enrollio account
  • Your form is either:
    • An Enrollio embed, or
    • A standard HTML <form> with valid input fields

Forms inside iframes, popups, or JavaScript widgets will not be tracked.

Step 1: Get Your Tracking Script

In your Enrollio account:

  1. Click Settings → External Tracking
  2. 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.

[SCREENSHOT: External Tracking settings page showing the Copy Script button and example code]

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
  • 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 Enrollio Tracking: Missing data-tracking-id attribute, your GTM setup is stripping the ID.

Workaround:

  1. Create a Custom HTML Tag in GTM
  2. Paste your full tracking code (do not modify it)
  3. Set trigger to All Pages
  4. Preview the page, open DevTools → Elements tab
  5. Verify the data-tracking-id attribute is still present in the script tag
  6. If it's missing → install the code manually in your site footer instead

Step 3: Ensure Your Form Is Compatible

The tracking script supports:

  • Enrollio embedded forms
  • Standard HTML forms rendered directly in the page code

Form Requirements

For submissions and field capture to work:

  • A real <form> tag must exist
  • Fields must:
    • Be visible
    • Have a valid name attribute
    • Include an email field

Not Supported:

  • Forms inside iframes
  • Popup-based forms
  • Third-party widgets that don't expose real inputs in the page code

✨ Custom Field Capture

External Tracking now captures more than just name and email.

Supported Field Types

The script can capture:

  • Single-line & multi-line text
  • Dropdowns (single & multi-select)
  • Checkboxes & radio buttons
  • Ratings & scores
  • Number, monetary & date picker fields
  • File uploads & signatures (metadata only)
  • Source, captcha & boolean fields

Field Capture Rules

Fields are captured only if they:

  • Are visible on the form
  • Have a valid name attribute

Hidden or disabled fields are ignored unless explicitly configured.

Smarter Field Mapping

Captured fields are mapped using this priority order:

  1. Field name matches an Enrollio property or custom field key
  2. Field label matches an Enrollio display name
  3. Field name matches label text (case-insensitive)

If no match is found, the value is stored as unmapped_field. This helps you identify and fix mapping issues quickly.

Better Data Handling

Captured values are stored with awareness of:

  • Text vs numeric fields
  • Single-select vs multi-select values
  • Metadata-only handling for file uploads and signatures

This ensures consistent behavior in automations.

Step 4: View Submissions

In your Enrollio account:

  1. Go to Sites → Forms → Submissions
  2. Filter by External Form Name

Submissions appear with a tag: external form: {form_name}

[SCREENSHOT: Forms → Submissions view filtered to show external form submissions with tags]

Step 5: Automation Triggers

You can automate actions based on:

Page View Trigger

Fires when a prospective family views a page with the tracking script, even if anonymous. Anonymous activity is stored and later attached to the parent record when they submit an Enrollio 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.)
[SCREENSHOT: Automation builder showing Page View and Form Submission triggers with filter options]

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 [Enrollio Tracking] logs.

2. Network Checks

  • Look for successful 2xx responses in the Network tab
  • Ensure no CORS errors appear

3. Cookie Verification

  1. Go to DevTools → Application → Cookies
  2. Confirm a session cookie is created
  3. If missing → browser privacy or third-party restrictions might block it

4. Common Issues

Problem Fix
No console logs Add data-debug="true" and verify script placement
CORS errors Check server CORS settings
Form not tracked Confirm <form> tag and email input exist
Tracking ID missing Ensure GTM hasn't stripped attributes
Single-page app routing issues Trigger manual page_view events after route change

Example Full Form

<form name="signup" action="/thank-you" method="POST">
  <label>Parent Name
    <input type="text" name="name" required>
  </label>
  
  <label>Email
    <input type="email" name="email" required>
  </label>
  
  <label>Phone
    <input type="tel" name="phone">
  </label>
  
  <label>Child's Age
    <select name="child_age">
      <option value="infant">Infant</option>
      <option value="toddler">Toddler</option>
      <option value="preschool">Preschool</option>
    </select>
  </label>
  
  <button type="submit">Request Tour</button>
</form>

<!-- External Tracking Script -->
<script 
  src="https://link.yourdomain.com/js/external-tracking.js" 
  data-tracking-id="tk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx">
</script>
</body>
</html>
💡 Pro Tip: Name your form fields to match your Enrollio custom fields exactly (like child_age or start_date) for automatic mapping. This saves time and ensures data flows correctly into parent records.

FAQs

Will this work with my existing website?

Yes, as long as you can add custom code before the closing </body> tag. Most modern website builders support this.

Do I need to install this on every page?

Install it site-wide for full tracking. If you only want to track specific pages, add it only to those pages — but you'll miss page view data from other pages.

Will this slow down my website?

No. The script is lightweight and loads asynchronously, so it won't impact page load speed.

Can I track multiple forms on one page?

Yes. The script automatically detects and tracks all compatible forms on a page.

What happens if a family doesn't submit the form?

Their page views are stored anonymously in their browser. If they return later and submit a form, all previous activity will be linked to their parent record.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.