{"_id":"@bitmovin/player-integration-nielsen","_rev":"11-70f28ef4f95f5e3bd3b9fe46e91866b7","name":"@bitmovin/player-integration-nielsen","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bitmovin/player-integration-nielsen","version":"1.0.0","keywords":[],"author":"","license":"ISC","_id":"@bitmovin/player-integration-nielsen@1.0.0","maintainers":[{"name":"bitadmin","email":"admin@bitmovin.com"}],"dist":{"shasum":"bf1eddcf4b337b95a5416f71b58b0c7d37e96e28","tarball":"https://registry.npmjs.org/@bitmovin/player-integration-nielsen/-/player-integration-nielsen-1.0.0.tgz","fileCount":6,"integrity":"sha512-fGqHFoYXVRoazDBWYj1iUvQXvxpSPZS8YVO0QnTrKAoAZhkYOHBIx3Pu6RhjRKd2O0ekpBiR0NIAcbPoiIQZhw==","signatures":[{"sig":"MEYCIQCPWPOV3WswFdLhToBREzrvlYSdQHtsxyynOvLyIyll8AIhAM3v9FuMTYkyqJ9KBNyOj81FIGu5Rx2aomknSUWqIDjP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":135894},"main":"dist/bitmovin-player-measurements-nielsen.js","types":"dist/bitmovin-player-measurements-nielsen.d.ts","gitHead":"b24b32d2ab2ab7d14e1bc80cdb06fdf8e22b6da9","scripts":{"lint":"prettier --check src/**/*.ts","test":"jest","build":"webpack --config webpack.config.js && npm run build:types","clean":"rm -rf ./dist","start":"webpack serve --config webpack.dev.js","format":"prettier --write .","lint:fix":"prettier --write src/**/*.ts","build:types":"dts-bundle-generator -o dist/bitmovin-player-measurements-nielsen.d.ts src/ts/index.ts"},"_npmUser":{"name":"bitadmin","email":"admin@bitmovin.com"},"_npmVersion":"10.9.4","description":"Nielsen Measurement integration for Bitmovin Player","directories":{},"_nodeVersion":"22.21.0","dependencies":{"uuid":"^11.1.0","bitmovin-player":"^8.221.0","bitmovin-player-ui":"^3.98.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","serve":"^14.2.4","ts-jest":"^29.1.0","webpack":"^5.101.0","prettier":"^2.8.8","ts-loader":"^9.0.0","typescript":"^5.0.0","@types/jest":"^29.5.0","html-loader":"^5.1.0","webpack-cli":"^6.0.1","webpack-dev-server":"^5.2.2","copy-webpack-plugin":"^13.0.0","create-file-webpack":"^1.0.0","html-webpack-plugin":"^5.6.3","dts-bundle-generator":"^9.5.1","string-replace-loader":"^3.0.0","jest-environment-jsdom":"^30.0.5"},"_npmOperationalInternal":{"tmp":"tmp/player-integration-nielsen_1.0.0_1764249994791_0.31779067773368497","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-11-27T13:26:34.684Z","modified":"2026-09-08T09:53:24.274Z","1.0.0":"2025-11-27T13:26:34.970Z"},"license":"ISC","keywords":[],"description":"Nielsen Measurement integration for Bitmovin Player","maintainers":[{"email":"admin@bitmovin.com","name":"bitadmin"},{"email":"jakov.fustin@bitmovin.com","name":"jf-bitmovin"},{"email":"vojtech.zalesky@gmail.com","name":"mimoza"},{"email":"jakob.mayring@bitmovin.com","name":"jmayring"},{"email":"lukas.knoch-girstmair@bitmovin.com","name":"l_kg"},{"email":"daniel.weinberger@bitmovin.com","name":"dweinber"},{"email":"lukas.kroepfl@bitmovin.com","name":"lkroepfl"}],"readme":"# Bitmovin Player Web Nielsen Measurement\n\nTypescript integration that connects the [Bitmovin Web Player SDK](https://bitmovin.com/docs/player) with the Nielsen Measurements SDK to provide audience measurement analytics.\n\nThis library listens to Bitmovin Player events, translates them into the required Nielsen events, and forwards them to the Nielsen SDK.\n\n## Features\n\n*   Tracks core video playback events (play, pause, seek, end, etc.).\n*   Handles playback interruptions and ad breaks.\n*   Constructs and sends content and ad metadata to Nielsen.\n    *   Allows for customization of the metadata generation.\n\n## Prerequisites\n\nBefore you can use this integration, you will need:\n\n1.  A valid **Nielsen `appID`**. You must obtain this directly from your Nielsen representative.\n2.  A **User Consent Management** system. Your application is responsible for gathering user consent for data collection in accordance with privacy regulations (e.g., GDPR, CCPA). This integration will only track data when consent has been provided.\n3.  An active [Bitmovin Player](https://bitmovin.com/dashboard/player) license.\n\n## Installation\n\n### Using npm\n\n```bash\nnpm install @bitmovin/player-integration-nielsen\n```\n\nThen import in your project:\n\n```javascript\nimport { NielsenMeasurements } from '@bitmovin/player-integration-nielsen';\n```\n\n### Using a Script Tag\n\nInclude the library after the Bitmovin Player SDK:\n\n```html\n<!-- Bitmovin Player SDK -->\n<script src=\"https://cdn.bitmovin.com/player/web/8/bitmovinplayer.js\"></script>\n\n<!-- Nielsen Measurement Integration -->\n<script src=\"path/to/bitmovin-player-measurements-nielsen.js\"></script>\n```\n\nWhen loaded via script tag, the library is available under the `bitmovin.player.measurements` namespace:\n\n```javascript\nconst NielsenMeasurements = bitmovin.player.measurements.NielsenMeasurements;\n```\n\n## Quick Start\n\nExample of how to integrate the Nielsen Measurement tracker with the Bitmovin Player.\n\n```javascript\nconst playerConfig = {\n    key: 'KEY',\n    playback: {\n        muted: true,\n        autoplay: true,\n    },\n    advertising: {\n        adBreaks: [\n        {\n            tag: {\n            type: 'vast',\n            // More Ad Samples can be found here:\n            // https://developers.google.com/interactive-media-ads/docs/sdks/html5/client-side/tags\n            url: 'https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dredirecterror&nofb=1&correlator=',\n            },\n        },\n        ],\n    },\n};\n\n// Sample video source\nconst sourceConfig = {\n    title: 'Sintel',\n    dash: 'https://bitmovin-a.akamaihd.net/content/sintel/sintel.mpd',\n    poster: 'https://bitmovin.com/wp-content/uploads/2016/06/sintel-poster.jpg',\n};\n\nbitmovin.player.Player.addModule(window.bitmovin.player['advertising-bitmovin'].default);\n\n// Create the Bitmovin Player instance\nconst playerContainer = document.getElementById('player');\nconst player = new bitmovin.player.Player(playerContainer, playerConfig);\n\nplayer.load(sourceConfig);\n\n// Create the instance and attach it to player, with appropriate metadata for content\nconst NielsenMeasurements = bitmovin.player.measurements.NielsenMeasurements;\n// Simplest example\n/*\n    const measurements = new NielsenMeasurements({\n        appId: 'PTEST',\n        instanceName: 'testInstance'\n    });\n*/\n\n// Example of attaching Nielsen measurements with custom content metadata builder\nconst measurements = new NielsenMeasurements({\nappId: 'PTEST',\ninstanceName: 'testInstance',\nmetadataBuilder: {\n    buildContentMetadata: (player) =>\n        // This example uses the default content metadata builder (withContent) but also adds a custom field\n        new bitmovin.player.measurements.NielsenMetadataBuilder({\n            subbrand: 'my-subbrand',\n            assetId: 'Sintel',\n        })\n        .withContent(player)\n        .withCustomField('nol_p0', 'customFieldValue'),\n    },\n});\n\nmeasurements.attachTo(player);\n```\n\n\n## Configuration Options\n\nThe `NielsenMeasurements` constructor accepts a configuration object with the following properties:\n\n| Option         | Type    | Required | Description                                                                                             |\n| -------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------- |\n| `appID`        | string  | Yes      | The application ID provided by Nielsen.                                                                 |\n| `instanceName` | string  | Yes      | A unique name for this player instance.                                                                 |\n| `debug`        | boolean | No       | If `true`, enables Nielsen console logging if desired. Defaults to `false`.               |\n| `optOut`       | boolean | Yes       | If `true`, disables all tracking. Use this to manage user consent. Defaults to `false`.                 |\n| `enableFpid`   | boolean | No        | Turn on or off the First Party ID. i.e. \"true\" for turn on, \"false\" for turn off. The default value is \"true\".                                                                 |\n| `hem_sha1`     | string  | No        | Hashed (SHA256) value of member id, i.e. for the sample memberID \"userMemberID123\", the value to pass is \"7ed2155ee9964d69ca425b0aceccda25d5462e06228a40d0da4dce5a4eb3e826\"                                                                 |\n| `uid2`         | string  | No        | Hashed (SHA256) value of UID2, i.e. for the sample UID2 \"userUID2\", the value to pass is \"7b733f363eb756046bf72bf476d24611e931e763222a7e89537477261f7bae05\"                                                                 |\n| `hem_sha256`   | string  | No        | Hashed (SHA256) value of the user email address, i.e. for the sample email address \"useremail@company.com\", the value to pass is \"0da83f9ab3bf59e3638f96d83409878fb507d3edd4d3637ca5eae4ddda5bb969\"\n\nIt also accepts an optional metadata object that can be used to set default metadata paramters for the content that will be played (does not get applied to any ads)\n\n## Content Metadata\n\nThe Nielsen SDK requires metadata about the content being played to correctly classify and report viewing data. This integration attempts to build the required metadata object from the Bitmovin Player's source information, but for accurate reporting, you should provide as much metadata as possible and/or override the metadata builder methods. More information on this can be found on the `NielsenMeasurementsConfig` class, head to the `NielsenMetadataBuilder` class to find out more about the provided methods to set your custom metadata object.\n\nFor a complete list of all available metadata fields and their descriptions, please refer to the official [Nielsen SDK Metadata Documentation](https://engineeringportal.nielsen.com/wiki/France_SDK_Metadata#Content_Metadata).\n\n\n## Handling User Consent\n\nYour application is responsible for obtaining user consent. You can disable tracking by setting the `optOut` flag during initialization.\n\n## Development\n\nTo contribute, clone the repository and install the dependencies.\n\n```bash\n# Clone the repository\ngit clone https://github.com/your-username/bitmovin-player-web-nielsen-measurement.git\ncd bitmovin-player-web-nielsen-measurement\n\n# Install dependencies\nnpm install\n\n# Build to run example\nnpm run build\n\n# Run the example\nnpm start\n\n# Run tests\nnpm run test\n\n```\n\n## Maintenance and Updates\n\nAs an open source project, this library is not part of a regular maintenance or update schedule and is updated on an adhoc basis when contributions are made.\n\n## Contributing to this project\n\nWe are pleased to accept changes, updates and fixes from the community wishing to use and expand this project. Bitmovin will review any Pull Requests made. We do our best to provide timely feedback, but please note that no SLAs apply. New releases are tagged and published on our discretion. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for more details on how to contribute.\n\n## Raising a Feature Suggestion\n\nIf you see something missing that might be useful but are unable to contribute the feature yourself, please feel free to [submit a feature request](https://community.bitmovin.com/t/how-to-submit-a-feature-request-to-us/1463) through the Bitmovin Community. Feature suggestions will be considered by Bitmovin’s Product team for future roadmap plans.\n\n## Reporting a bug\n\nIf you come across a bug related to this SDK, please raise this through the support ticketing system accessible in your [Bitmovin Dashboard](https://dashboard.bitmovin.com/support/tickets).\n\n## Support and SLA Disclaimer\n\nAs an open-source project and not a core product offering, any request, issue or query related to this project is excluded from any SLA and Support terms that a customer might have with either Bitmovin or another third-party service provider or Company contributing to this project. Any and all updates are purely at the contributor's discretion.\n\n## Need more help?\n\nShould you need further help, please raise your request to your Bitmovin account team. We can assist in a number of ways, from providing you professional services help to putting you in touch with preferred system integrators who can work with you to achieve your goals.\n","readmeFilename":"README.md"}