Adding labels to the page

Every page has a set of labels so that the page can be identified. The following labels are required for a correct measurement:

  • pagina
  • omgeving
  • merkId
  • merk
  • platform
  • merkType

The omgeving label is very important, it determines the destination of the measurements. It can be set to one of: ‘prod’, ‘preprod’ or ‘dev’. The dev environment is meant to verify the correctness of the implementation while prod is meant for live sites. The meaning of the other labels are found in the tagging plan. Optional labels can also be found there.

How to set labels

Labels can be set through a script tag. Labels should be set before the tag itself is placed on the page.

Example with only required labels


	NPOlabels = {
		pagina: 'home',
		omgeving: 'dev',
		merkId: 1,
		merk: 'npoportal',
		platform: 'site',
		merkType: 'standalone'


Example with all labels


	NPOlabels = {
		pagina: 'boerzoektvrouw_KN_1683530',
		niveau1: 'programmas',
		niveau2: 'franchise',
		niveau3: '',
		omroep: 'kroncrv',
		omgeving: 'prod',
		merkId: 4,
		merk: 'npoportal',
		platform: 'site',
		programma: 'boerzoektvrouw',
		merkType: 'portal',
		nobo: {
		    apparaatId: '1234567890abcdef',
		    eventType: 'index',
		    mediaType: 'general'
		omroeplabel1: '',
		omroeplabel2: '',
		omroeplabel3: '',
		omroeplabel4: '',
		omroeplabel5: ''
		gebruiker: {
		  npoId: 'abcde12345',
		  profielId: 'vwxyz98765',
		  npoType: 'premium',
		zoek: {
		    term: '',
		    paginanummer: '',
		    positie: ''
		platformVersie: '1.0.0'