Releases: keen/keen-tracking.js
v5.0.0
v4.5.1
v4.4.1
v4.4.0
New features:
AutoCollector:
- Ability to add pointer position for tracking click events
This could be set up in configuration object:
recordClicksPositionPointer: false, // record pointer position for clicks
Example of data added to event for auto tracking clicks:
{
"pointer": {
"x_position": 8,
"y_position": 830,
}
}
v4.3.0
New feature:
Tracking Opt-Out
It's easy to build tracking opt-out functionality. If opt-out is set to true no data is recorded.
You can set up opt-out by defining client instance
const client = new KeenTracking({
projectId: 'PROJECT_ID',
writeKey: 'WRITE_KEY',
optOut: true
});
or by invoking client.setOptOut(true)
method
client.setOptOut(true);
Navigator.DoNotTrack support
The user can block tracking in the browser by doNotTrack setting. We can respect or overwrite this setting by defining client instance.
const client = new KeenTracking({
projectId: 'PROJECT_ID',
writeKey: 'WRITE_KEY',
respectDoNotTrack: true // it's false by default
});
Read more:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
https://en.wikipedia.org/wiki/Do_Not_Track
v4.2.0
New features:
AutoCollector:
- Ability to track views of the HTML elements
All HTML elements with a class .track-element-view
will be observed by the browser. If any of them appears on the screen, an event will be recorded. The event will contain specific attributes from the visible element and nest them in the element
property.
Note: This feature works only on the browsers that support Intersection Observer.
{
"element": {
"title": "Track element view",
"text": null,
"class": "track-element-view",
"event_key": null,
"node_name": "DIV",
"href": null,
"x_position": 8,
"y_position": 830,
"selector": "body > div:eq(1)",
"id": null
}
}
v4.0.17
Build tool update:
- Webpack-dev-server security update to 3.1.14
v4.0.16
v4.0.1
4.0.1
v4.0.0
New features:
- ability to use different request types in one client
- ability to track only unique events in the Node.js environment.
Deprecated and removed methods:
- request types: jsonp, xhr
- addEvent
- addEvents
- setGlobalProperties
We reduced the size of the gzipped js file to 18.3 KB (5% reduction).