Skip to main content

Instant tracking

The Instant tracking is a built-in module of the Javascript SDK >= 6.16.0 enabling easier tagging for core analytics features. This set of events are automatically tracked without any need for manual implementation aside from the SDK loading and configuration (site id and collect domain).

tip

This feature also comes with an out-of-the-box board based on the data collected, which can be deployed for your organization upon request.

Please reach out to the Support centre or your preferential contact to request a demo or have it activated.

Tracking available

Instant tracking can automatically measure the following events

  • page.display
  • click.download
    • pdf, xls, xlsx, doc, docx, txt, rtf, csv, exe, key, pps, ppt, pptx, 7z, pkg, rar, gz, zip, avi, mov, mp4, mpg, mpeg, wmv, mid, midi, mp3, wav, wma
  • internal_search_result.display
    • q, s, search, query, keyword

On top of these events, it also collects contextual properties built-in the SDK and our processing such as

  • Organic and marketing traffic sources
  • Geolocation
  • Browsers and devices

Configuration

This code sample loads the Piano Analytics SDK, and enables all the instant tracking features.

The site and collectDomain need to be changed according to your organization Data Collection Portal. The consentDefaultMode can also be changed, please refer to the Consent documentation for more information.

For a lightweight implementation:

(function (_config) {
var script = document.createElement("script");
script.src = "https://tag.aticdn.net/piano-analytics.js";
script.async = true;
script.crossorigin = "anonymous";
script.dataset.config = JSON.stringify(_config);
document.head.appendChild(script);
})({
site: 123456789,
collectDomain: "https://xxxxxxx.pa-cd.com",
instantTracking: true,
consentDefaultMode: "opt-in",
});

The Instant Tracking features can also be individually deactivated:

(function (_config) {
var script = document.createElement("script");
script.src = "https://tag.aticdn.net/piano-analytics.js";
script.async = true;
script.crossorigin = "anonymous";
script.dataset.config = JSON.stringify(_config);
document.head.appendChild(script);
})({
site: 123456789,
collectDomain: "https://xxxxxxx.pa-cd.com",
instantTracking: {
pages: true,
searches: false,
downloads: true,
},
consentDefaultMode: "opt-in",
});
tip

Each element of the instantTracking object can be turned on-off at will, allowing you to track what you need but also build on top of the Instant tracking module.