navigation

NPOTag SDK documentation

Welcome to the documentation page of NPOTag, a project hosted by the Data Integration, Recommendation and Search (DIAZ) team of the NPO. This SDK allows for event measurement for both AT Internet and Govolte.

The NPO Tag was born out of a need to bring both the Govolte Tracker and the Publieks Onderzoek online measurements closer together. The NPOTag is a tagging wrapper developed by DIAZ, and forms the basis for the recommendations and data analysis at the NPO. The NPO Tag is essentially a wrapper around two distinct analytics SDKS, the govolte (gvt.js) SDK used by the NPO DIAZ Team and the Piano (smarttag.js) SDK used by the NPO Publieks Onderzoek department. Both teams share the same specification for measurements, the so-called “tagplan”. This plan is managed by the data analysis team and available upon request (data-analyse@npo.nl). Although the fields are shared, some values are only available to one of the departments, for example the ProfileId (only available to DIAZ).

Who is this documentation for?

This documentation is written for portal owners and developers. It documents the services we offer and the technical steps necessary to activate these services on a portal.

What are you waiting for? Get started!

Release Notes

v3.2.1

Changes (non-breaking):

  • Added A/B testing functionality via pageTracker.abAssign() Experimental, for web only

v3.1.2

Changes (non-breaking):

  • Fixed an edge case where the Piano ATVisitorID stored in the Piano plugin and local storage could run out of sync. This should improve correct user identification (preventing known users from erroneously getting classified as new ones), though it is unknown how often this edge case has occurred.

v3.1.1

Changes (non-breaking):

  • Piano ATVisitorID will now be managed by the NPOTag using localstorage, which avoid issues on platforms that do not support Cookies (SmartTV)

v3.0.1

Changes (non-breaking):

  • events cached size (used when delivery does not work) is limited to 1000 (~750mb, all events in >99.9% of sessions)

Documentation can be found here: https://npotag.npo-data.nl/

v3.0.0

Breaking change

  • The newTag() constructor had an optional serializedSessionInfo parameter introduced in 2.2.0. It is removed and now has its own dedicated contructor newTagFromSession()

Additional changes

  • Expanded session export with brand an platform info

v2.2.0

  • Added option to disable NMOdam
  • Added session export function
  • Added session import function
  • Changed default storage to LocalStorage instead of cookies
  • Minor dependency updates

v2.1.0

  • Updated smarttv testing infrastructure for manual tests
  • Added compatibility for old browsers (Chromium 38 baseline)

v2.0.0

  • NPM scope has changed from @npo to @npotag!
  • All event property interfaces are now exported for linting convenience and implementation flexibility.
  • A docker-compose test setup to test the demo app in a Chromium 38 environment (simulates smartTV) was added.

v1.0.3

Bugfix

  • Add browserslist to include plugins for iOS 13 support

v1.0.2

Bugfix

  • Fixed IOS 13 safari support
  • Fixed bug with LG WebOS 3.5 compatibility

v1.0.1

Bugfix

  • Updated to Node 16
  • Fixed concurrency bug in tests / failing CI
  • Fixed stream_position for live events
  • Added global environment variable
  • Vulnerability patches
  • Additional tests

v1.0.0

  • Initial release of the new rewritten NPOTag

v2.2.7

  • Updated Piano SDK that should fix duplicate sending of piano events

v2.2.5

  • Fixed the usage of user agent string logging
  • Added a maximum of backlogged messages
  • Updated dependencies

v2.2.4

  • Updated the source for properties on Apple Watch devices

v2.2.3

  • Support for Apple Watch devices Special thanks:
  • Our colleagues at NOS

v2.2.2

  • Bump activesupport and piano dependencies

v2.2.1

  • Expanded session export with brand and platform data

v2.2.0

  • Added session export

v2.1.0

  • Allow disabling NMO DAM

v2.0.2

Bugfix

  • Changed NMO calls so that panel membership is correctly reported

v2.0.1

Bugfix

  • Updated PianoAnalytics SDK to version 3.0.4

v2.0.0

Version 2 release

Version 2 release due to interface change:

  • The streamTracker’s streamPosition argument now requires a Double data type instead of Float.

Added features:

  • Fixed stream position for live streams so that they are now correctly counted in Piano post-processing.
  • Added optional environment field (dev, preprod, prod)
  • Fixed bug where is_new_session was set incorrectly

v1.0.1

Bugfix

  • PageContext was not sent with click events for At plugin

v1.0.0

  • Initial release of the new rewritten NPOTag

v2.0.4

Bugfixes:

  • Fix SQLiteReadOnlyExceptions when trying to create a internal database for the Govolte plugin
  • Fix IOExceptions Unable to rename of db file

v2.0.3

  • Expanded session export with brand and platform data

v2.0.2

  • Added session export
  • Added option to disable NMOdam

v2.0.1

Bugfix

  • Changed NMO calls so that panel membership is correctly reported

v2.0.0

Version 2 release

Version 2 release due to interface change:

  • The streamTracker’s streamPosition argument now requires a Double data type instead of Float.

Added features:

  • Fixed stream position for live streams so that they are now correctly counted in Piano post-processing.
  • Added optional environment field (dev, preprod, prod)

v1.0.3

Bugfix

  • Fixed error message for empty panelFormat

v1.0.2

Bugfix

  • fixed contextContentID not being optional

v1.0.1

Bugfix

  • fixed moshi configuration

v1.0.0

  • Initial release of the new rewritten NPOTag