Edge Pulse JavaScript tag
Choose between the two Edge Pulse tags, and look up the browser settings each one respects and the data the tag collects.
The Edge Pulse JavaScript tag is the script that collects measurements from the browsers of the visitors to your pages. Edge Pulse serves it from Azion Console in two forms, the Default Tag and the Pre-loading Tag.
The tag Azion Console serves is customized for your account, so this page describes the two forms rather than reproducing either one. Copy the tag your own Console serves, and do not reuse a tag taken from anywhere else.
The tag is fully asynchronous. It respects the protocol in use, HTTP or HTTPS. It does not interfere with the loading process or with the internal structure of the delivered content.
Tags
Both Edge Pulse tags go in the same place, in the HTML of the page and before the closing body tag. They differ in when the browser runs them.
| Tag | When it runs | When to choose it |
|---|---|---|
| Default Tag | After the loading event completes. The tag waits for that event, then downloads and runs the RUM Client. | The page allows inline JavaScript. Waiting for the loading event keeps that event uninterrupted and leaves the visitor’s experience unaffected. |
| Pre-loading Tag | Before the load event fires. | The page carries Content Security Policy settings that prevent the use of inline JavaScript. |
Tag placement
Edge Pulse measures a page only when that page carries the tag. The tag is on the Edge Pulse page in Azion Console, behind the Copy to Clipboard button. One tag covers one page, and Edge Pulse collects nothing for a page that carries no tag.
The tag is published by hand, or through a tag management system. When the browser runs it depends on which of the two tags you added. To copy the tag and add it to a page, refer to Edge Pulse quickstart.
What the tag does not take
The tag has no settings. There is no sampling rate to lower, no field to exclude from what it sends, and no way to keep your own traffic out of the measurements. Choosing between the Default Tag and the Pre-loading Tag, and choosing which pages carry a tag at all, are the two decisions available to you.
The tag also measures only the page load it runs on. It does not watch for later route changes, so a single-page application reports one measurement per full load. For why that follows from when the tag runs, refer to How Edge Pulse works.
Browser settings
Edge Pulse reads the navigator.doNotTrack setting of the visitor’s browser. The value decides whether the visitor identifier survives from one visit to the next.
| Value | Behavior of Edge Pulse |
|---|---|
navigator.doNotTrack set to 1 | If tracking was never allowed, and Edge Pulse therefore never used the local storage, an identifier is generated for each visit the visitor makes to the site. If the value is 1 but the visitor was tracked before, the previous identifier is deleted and a new one is generated. |
navigator.doNotTrack set to any other value | Edge Pulse tracks, and the same identifier is used for each visit of a visitor. |
Visitor identifier
Edge Pulse identifies a visitor with a value generated by the UUID4 algorithm, the random variant of the universally unique identifier scheme. It keeps that value in the local storage of the browser, the store a browser holds for one site and does not clear when the page closes. The navigator.doNotTrack setting decides how long the value lives.
To follow the identifier through a measurement, refer to How Edge Pulse works.
Collected data
Edge Pulse collects information such as the resolver used for DNS resolution, the data center tested, and the visitor’s anonymous network. Those are instances of the five categories the collected data falls into:
- Navigation
- Performance
- User experience
- Informational
- Network