Skip to main content

Track Kantar Focal Meter events on web

This plugin provides integration with Focal Meter by Kantar. Focal Meter is a box that connects directly to the broadband router and collects viewing information for the devices on your network.

This integration enables measuring the audience of content through the Focal Meter router meter. The plugin has the ability to send the domain user ID to a Kantar Focal Meter endpoint. A request is made when the first event with a new user ID is tracked.

The plugin inspects the domain user ID property in tracked events. Whenever it changes from the previously recorded value, it makes an HTTP GET request to the kantarEndpoint URL with the ID as a query parameter.

Optionally, the tracker may store the last published domain user ID value in local storage in order to prevent it from making the same request on the next page load. If local storage is not used, the request is made on each page load.

note

The plugin is available since version 3.16 of the tracker.

The Focal Meter integration is automatic once configured.

Install plugin

Tracker DistributionIncluded
sp.js
sp.lite.js

Download:

Download from GitHub Releases (Recommended)Github Releases (plugins.umd.zip)
Available on jsDelivrjsDelivr (latest)
Available on unpkgunpkg (latest)

Enable integration

To integrate with the Kantar FocalMeter, use the snippet below after setting up your tracker:

javascript
window.snowplow(
'addPlugin',
'https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-focalmeter@latest/dist/index.umd.min.js',
['snowplowFocalMeter', 'FocalMeterPlugin']
);

window.snowplow('enableFocalMeterIntegration', {
kantarEndpoint: '{{kantar_url}}',
useLocalStorage: false // optional, defaults to false
});

The enableFocalMeterIntegration function has the following arguments:

ParameterTypeDefaultDescriptionRequired
kantarEndpointstring-URL of the Kantar endpoint to send the requests to (including protocol)Yes
processUserId(userId: string) => string-Callback to process user ID before sending it in a request. This may be used to apply hashing to the value.No
useLocalStoragebooleanfalseWhether to store information about the last submitted user ID in local storage to prevent sending it again on next load (defaults not to use local storage)No

If you choose to storage the last submitted user ID in local storage, the plugin will use the key sp-fclmtr-{trackerId}. The trackerId is your tracker namespace.

Processing the user ID

By default, the plugin sends the domain user ID as a GET parameter in requests to Kantar without modifying it. In case you want to apply some transformation on the value, such as hashing, you can provide the processUserId callback in the enableFocalMeterIntegration call:

javascript
window.snowplow('enableFocalMeterIntegration', {
kantarEndpoint: "https://kantar.example.com",
processUserId: (userId) => md5(userId).toString(), // apply the custom hashing here
});

Configure multiple trackers

If you have multiple trackers loaded on the same page, you can enable the Focal Meter integration for each of them by specifying the tracker namespace as the third parameter to the enableFocalMeterIntegration function:

javascript
window.snowplow(
'enableFocalMeterIntegration',
{ kantarEndpoint: 'https://kantar.example.com' },
['sp1', 'sp2'] // Only these tracker namespaces will send to Kantar
);

Request format

The tracker will send requests with this format:

GET https://your-kantar-endpoint.com?vendor=snowplow&cs_fpid=d5c4f9a2-3b7e-4d1f-8c6a-9e2b5f0a3c8d&c12=not_set

Where:

  • vendor is always snowplow
  • cs_fpid is the domain user ID, or the processed version if a processUserId callback is provided
  • c12 is always not_set

On this page

Want to see a custom demo?

Our technical experts are here to help.