Read on for more information:
- Tracking users cross-domain
- Tracking timings
- Dynamic handling of single-page apps
- Improved PerformanceTiming context
- Other improvements
- Documentation and help
Snowplow r63 (coming soon), will add new
refr_dvce_tstamp fields to the
atomic.events table, which will then be populated based on the “_sp” field.
You can control which links should be decorated using a filter function. For each link element on the page, the function will be called with that link as its argument. If the function returns
true, event listeners will be added to the link and will decorate it when the user navigates to it.
To enable cross-domain tracking, add this function to the tracker constructor argmap with the key “crossDomainLinker”.
For example, this function would only decorate those links whose destination is “http://acme.de” or whose HTML id is “crossDomainLink”:
If you want to decorate every link to the domain github.com:
If you want to decorate every link, regardless of its destination:
If new links are added to the page after the tracker is initialized, you can enable decoration for them using the
crossDomainLinker tracker method:
trackTiming method can be used to track user timing information. This example uses the method to send a
timing event describing how long it took a map to load:
You can see the JSON schema for the event that the method generates here.
Version 2.4.0 of the Tracker automatically detects when the page URL changes and updates the page URL and referrer accordingly. The referrer is replaced by the old page URL. Note that you must send at least one event each time the URL changes, because the Tracker will not notice a skipped URL. This means that if the user navigates from
page3, but no events are fired while on
page3, the referrer reported for all events fired on
page3 will stil be
When you use the
setCustomUrl again. Setting the referrer URL using
setReferrerUrl is similarly sticky.
We recently added the ability to add a context containing data from the Navigation Timing API to all events. At the time the context gets constructed, some of the timing metrics (typically
domComplete) are usually not yet available.
With this releaes, the context is recalculated with every event instead of being cached, so missing timing metrics will be added to subsequent events as soon as those metrics become available.
We have also:
- Started adding common contexts (including the
link_clickevents, the only event types to which they were not already automatically added if enabled #340
- Started randomly generating the ngrok subdomain used for our integration tests to prevent clashes when the tests are run more than once simultaneously #333
- Updated the Vagrant setup to work with the latest version of Peru #336
The upgraded minified tracker is available here:
This release is fully backward-compatible.
The v2.4.0 release page on GitHub has the full list of changes made in this version.