Tracking script reference¶
What the tracking script is, what it needs from a website, and what it collects. For installation steps, see Install the tracking script.
The tag¶
<script async src="https://ctjs.au/ct.js" data-tracking-code="YOUR_TRACKING_CODE"></script>
| Attribute | Required | Description |
|---|---|---|
src |
Yes | Always https://ctjs.au/ct.js. There is no versioned URL; Enfonica updates the script in place. |
async |
Recommended | Lets the browser render the page while the script loads. |
data-tracking-code |
Yes | The tracking site's code, starting with E-. Without it the script does nothing. |
The script has no other customer configuration. Which numbers to swap, and how to format them, come from the tracking site's pool rules.
Size and delivery¶
About 30 KB compressed. Browsers cache it briefly, so updates reach visitors without any change on the website.
Browser requirements¶
Current versions of Chrome, Edge, Firefox and Safari, and Safari 15.4 or later on iOS. In older browsers the script does nothing and the page keeps its original number.
Requests¶
The script talks only to https://ctjs.au: once when a page loads, again when the URL changes on a single-page website, and periodically while the visitor is active so the assigned number stays with them.
URL parameters captured¶
utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id, utm_source_platform, utm_creative_format, utm_marketing_tactic, gclid, gbraid, wbraid, dclid, fbclid, msclkid, ttclid, li_fat_id and twclid. Call Tracking keeps the values from the landing page for the session.
Browser storage¶
The script keeps a session identifier in the browser's web storage so that a visit is recognised across pages and tabs for 30 minutes after the last activity. It doesn't set cookies. If storage is unavailable, each page load starts a new session.
Number matching¶
The script matches the rule's number in page text and in tel: links, in any usual Australian format, and replaces it with the assigned tracking number in the rule's display format. Numbers split across elements, inside images or inside other attributes aren't matched. See Where the number can be.
Single-page applications¶
The script detects URL changes and swaps numbers on the new view. See Single-page applications.
Console output¶
All messages are prefixed [EnfonicaTracker]. See Troubleshoot number swapping for the list.
Content Security Policy¶
script-src https://ctjs.au; connect-src https://ctjs.au;
No inline scripts, eval, iframes, images or cookies are used.