This page serves as a quick reference for your integration, containing mostly code snippets that you'll need at various stages of integration. For more information or if you need any help, refer to the details on Conviva JavaScript Sensor Integration page.
This documentation is for JS SDK 4.0.3 and above. If you are using the legacy SDK, we highly recommend you upgrade to the new SDK below. To migrate from the legacy SDK to the new SDK, refer to the migration API mapping document here and a summary of the migration benefits here.
Integration Summary
1. Install Conviva Library
Add Conviva Libraries and Configure Dependencies
|
Add core SDK |
|
|---|---|
|
Add dependencies for Ad SDKs |
If using one of the Ad SDKs Conviva provides a module for, download and add the library explicitly: https://github.com/Conviva/conviva-js-imasdk Refer to Integrate Ad Managers for the details of ad manager integration. |
|
Initialize the top level object |
Initialize the top level Conviva Analytics object:
Click the arrow to view the reference implementation:
Sample code illustrating initialization with/without debug:
IMPORTANT: No need to set |
|---|---|
Initialize the video object |
Create
|
Initialize the ad object |
Create
|
2. Configure Metadata
Pre-defined Video and Content Metadata
Constants for Pre-defined Video and Content Metadata
| Key / Constant | Type | Implementation Note |
|---|---|---|
| Conviva.Constants.ASSET_NAME | string | The unique name for each stream/video asset. Values
are up to your choice, but a human-readable text prefixed with the unique video
ID works best in most Conviva SDK's.**This provides for clarity in
reports and makes most popular content easily identifiable. Pattern: [videoID]
Video Title
The following are typical patterns for VOD (movies and episodic content)
and Live streams:
|
| Conviva.Constants.IS_LIVE | string | Denotes whether the content is video on-demand or a live stream. Affects the
computation and availability of the Conviva metrics.
|
| Conviva.Constants.PLAYER_NAME | string | A string value used to distinguish video players (applications). Simple values that are unique across all of your integrated platforms work best here. If the same player used across multiple platforms, e.g., Tizen, LG TV, WEB, give separate names for each application / platofrm: e.g., "JS Tizen", "JS LGTV", "JS WEB". Do not include the build or version number in this property. The intention is to have a simple way of differentiating data from different players / platforms. |
| Conviva.Constants.VIEWER_ID | string | Required for Viewers Module. A unique identifier to distinguish individual viewers or devices through Conviva's Viewers Module. The value shall be unique abstract user's identifier. If user is anonymous, do not set any value for this tag. |
| Conviva.Constants.STREAM_URL | string |
The manifest URL of the video stream.
The Conviva backend config server attempts to map a portion of StreamURL into a CDN name. For example: In the URL The URL values reported in the streamURL are case insensitive. The streamURLs with either all capitals or all lower case are acceptable. |
| Conviva.Constants.DEFAULT_RESOURCE | string |
This value specifies the video server or CDN name from where the streaming resource is played. Set this field when the video server resource cannot be inferred from the STREAM_URL. For example, if the streamURL is The DEFAULT_Resource value is case sensitive. If the resource name is initially reported as AKAMAI (all caps) and subsequently modified in the app to akamai (small letters), it is necessary to inform Conviva about the change because both need to be mapped in the Conviva backend configuration server to ensure that both point to the same CDN name (AKAMAI).
|
|
Conviva.Constants.DURATION |
integer | Duration of the video content, in seconds. |
| Conviva.Constants.ENCODED_FRAMERATE | integer | Encoded frame rate of the video stream in frames per second. |
| Conviva.Constants.FRAMEWORK_NAME | string | Video Player Framework Name.
NOTE: Autocollected if Conviva module used for video player integration, required for custom integration.
**Otherwise, set using the API
|
| Conviva.Constants.FRAMEWORK_VERSION | string | Video Player Framework Version.
NOTE: Autocollected if Conviva module used for video player integration, required for custom integration.
**Otherwise, set using the API
|
| "c3.app.version" | string | Application build version. Shall have the same value for both ads and video. |
| "c3.cm.contentType" | string | Advanced content delivery methods along with Live and VOD.
Acceptable values: "Live", "Live-Linear", "DVR", "Catchup", "VOD". |
| "c3.cm.channel" | string | The channel on which the content is consumed.
Example: "ABC". |
| "c3.cm.brand" | string | The name of the brand to which the content belongs.
Examples: "ABC X", "ABC Y". |
| "c3.cm.affiliate" | string | Affiliate or MVPD name for TV Everywhere authenticated services.
Examples: "Xfinity", "Comcast". |
| "c3.cm.categoryType" | string | Content business categories of interest.
Examples: "Episodic", "Movies", "News", "Sports", "Events", "Informercials", "Shorts", "Promos". |
| "c3.cm.name" | string | Name of CMS Provider.
Examples: "CMS", "ROVI", "TMS". |
| "c3.cm.id" | string | Unique asset identifier to query CMS system to gather additional asset metadata information for a specific asset.
Example: "003b094d-fc5c-3d5a-8ed0-301bf848291e". |
| "c3.cm.seriesName" | string | The name of Series. Set the value only if the metadata cannot be gathered from CMS System. Null if not applicable.
Examples: "Friends", "Null". |
| "c3.cm.seasonNumber" | string | The Season number. Set the value only if the details cannot be inferred from Asset Provider Server. Null if not applicable.
Examples: "1", "Null". |
| "c3.cm.showTitle" | string | The name of the Episode or Show Title. Set the value only if the details cannot be inferred from Asset Provider Server. Null if not applicable.
Examples: "The One with All the Cheesecakes", "Null". |
| "c3.cm.episodeNumber" | string | The Episode number. Set the value only if the details cannot be inferred from Asset Provider Server. Null if not applicable.
Examples: "3", "Null". |
| "c3.cm.genre" | string | The Primary content genre. Set the value only if the details cannot be inferred from Asset Provider Server. Null if not applicable.
Examples: "Drama", "Null". |
| "c3.cm.genreList" | string | The list of the applicable content genre. Set the values in a comma separated list only if the details cannot be inferred from Asset Provider Server. Null if not applicable.
Examples: "Drama, Crime, Political, Violence", "Null" |
| "c3.cm.utmTrackingUrl" | string | The UTM parameters in the URL track the effectiveness of online marketing campaign across traffic sources and publishing media. Autocollected from window.location.search, if not set by the application. Conviva uses CONTAINS logic to parse the individual UTM parameters from the URL provided, so either the full URL or just the UTM parameters is acceptable.
**Example values: This tag is only applicable for web and mobile devices. |
Device Metadata
Any Device metadata such as device brand, manufacturer, model, type, version, operating system
name and version, category which are common for all the concurrent playback with in one
Analytics instance can be reported using the Conviva.Analytics.setDeviceMetadata(/* object */ deviceMetadata):
Device Metadata Instructions (Click to Expand):
var deviceMetadata = {};
deviceMetadata[Conviva.Constants.DeviceMetadata.CATEGORY] = Conviva.Constants.DeviceCategory.WEB;
// set the rest of the required metadata fields as per the table below
Conviva.Analytics.setDeviceMetadata(deviceMetadata);
Custom Metadata
Refer to App Manager->Setup Metadata page for your account to find the custom tags which shall be implemented.
Set custom tags in a similar way for either video or ads, by adding the tags to the contentInfo / adInfo objects, passed into corresponding methods of videoAnalytics / adAnalytics objects.
Update/Amend Metadata
The device metadata can be immediately set when the values are available.
Example usage:
var contentInfo = {};
contentInfo[Conviva.Constants.ASSET_NAME] = "[channel_id] Live Channel Name";
// set the values for the other pre-defined keys as appropriate
contentInfo["c3.cm.contentType"] = "Live-Linear";
// set the values for custom tags as required per definition for your account
contentInfo["my_custom_tag_key"] = "my_custom_tag_value";
videoAnalytics.setContentInfo(contentInfo);
3. Report Events and Metadata
For each video play, report playback attempt requests |
|
|---|---|
Report Ad Breaks to Video Session |
**To handle ads, inform videoAnalytics object that ad break is started:**
Client-side Ads
Server-side Ads
On ad break ended
|
For each video play end, report playback ended |
|
4. Integrate Video Players
If instructions for your player are not shown below, please follow the instructions for "Custom Integration", or contact your Conviva representative.
HTML5VideoElement
Add the Conviva HTML5 Video Element module dependency |
Refer to this sample code to include the Conviva library and MSE open source: Via HTML:
Via import/require:
|
||||
|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
If Core SDK and html5 module are loaded in private scope instead of global scope, then pass the html5 module object as the second argument in the setPlayer API. Important: The application sets the player reference immediately after the player instance is available.
|
||||
|
Implement Metadata |
Report the device metadata of CATEGORY and TYPE explicitly by the application, as Conviva can autocollect the remaining metadata from the UAS. Refer to the code sample below:
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata definitions for implementation details. |
Conviva SDK can be used to integrate video players using explicit metric reporting using the videoAnalytics object. The major steps required are listed below:
Report playback failures |
To report fatal playback error AND quit the session:
Example usage:
|
|---|---|
Report playback metrics |
Example usage:
|
Implement Callback function for polled metrics |
NOTE: Since this API callback is called every 1 sec, it is recommended that no other metrics than the one specified be updated. It must not retain strong references to instances in outer scopes.
|
Implement Metadata |
For Custom Integration, Conviva SDK does not capture any metadata automatically. To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
Video.js
Conviva Video.js module autocollects events emitted by Video.js player. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as backgrounding, metadata, session close, ad-related events.
Add the Conviva Video.js module dependency |
Refer to the following sample code to load Video.js components first followed by Conviva modules: Via HTML:
Via import/require:
Application doesn't need to implement the system utility functions of Time, Timer, HTTP, Storage Load/Save, Log as Conviva Video.js module uses Conviva's default ones.
|
||||
|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
If Core SDK and Video.js module are loaded in private scope instead of global scope, then pass the Video.js module object as the second argument in the
|
||||
|
Implement Metadata |
Report the device metadata of CATEGORY and TYPE explicitly by the application, as Conviva can autocollect the remaining metadata from the UAS. Refer to the code sample below:
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
||||
| Clean up Conviva objects |
Report end of playback when playback ends or when all the ads are completed, whichever occurs last. Conviva objects must be released when the webpage lifecycle ends. Refer to Conviva Cleanup for more details. |
Conviva Chromecast v2 module autocollects events emitted by Player Manager. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as backgrounding, metadata, session close, ad-related events.
Add the Conviva Chromecast v2 module dependency |
You can add the Conviva Chromecast v2 module dependency by choosing one of the following options:
From Chromecast v2 module version 4.0.8 onwards, Conviva supports installation through npm and yarn package managers. To install using the npm package manager, use:
To install using the yarn package manager, use:
To download and add the library explicitly from Conviva GitHub, refer: https://github.com/Conviva/conviva-js-chromecast-v2 Refer to this sample code which includes the Chromecast v2 modules followed by Conviva modules:
Application doesn't need to implement the system utility functions of Time, Timer, HTTP, Storage Load/Save, Log as Conviva Chromecast v2 module uses Conviva's default ones. Conviva suggest that you initialize Conviva on
|
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
Since that moment, Conviva library will listen for all relevant events automatically. Metrics monitored by Conviva Chromecast v2 module (if applicable):
|
||||||||||||||||||||||||||||||
Implement Metadata |
Metadata monitored by Conviva Chromecast v2 module (if applicable):
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
||||||||||||||||||||||||||||||
|
Clean up Conviva objects |
Report end of playback where cast framework's |
Conviva Chromecast CAF module autocollects events emitted by Player Manager. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as backgrounding, metadata, session close, ad-related events.
Add the Conviva Chromecast CAF module dependency |
Refer to this sample code which includes the Chromecast CAF modules followed by Conviva modules. Via HTML:
Via Import/Require:
Conviva suggests that you initialize Conviva on
|
||||
|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
The
If Core SDK and ChromecastCaf module are loaded in private scope instead of global scope, then pass the ChromcastCaf module object as the second argument in the setPlayer API.
|
||||
|
Implement Metadata |
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
||||
|
Clean up Conviva objects |
Report end of playback where cast framework's |
Samsung TV Tizen Avplay
Conviva Samsung TV Tizen module autocollects events emitted by Tizen avplay. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as seek, metadata, session close, ad-related events.
Add the Conviva Samsung TV Tizen module module dependency |
Add the below mentioned configurations in the config.xml file in the application to provide the required privileges and the background support:
Refer to the sample code which loads the Tizen components first and then the Conviva libraries:
Application doesn't need to implement the system utility functions of Time, Timer, HTTP, Storage Load/Save, Log as Conviva Samsung TV Tizen module uses Conviva's default ones. Conviva suggest that you initialize Conviva on
|
|||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
IMPORTANT: The application listener should be set prior to reporting of the setPlayer API.
Connection Type is autocollected by Tizen module using the
|
|||||||||||||||||||||||||||||||||||
Implement Metadata |
Metadata monitored by Conviva Samsung TV Tizen module (if applicable): To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
|||||||||||||||||||||||||||||||||||
|
Clean up Conviva objects |
The cleanup should be invoked where Application's |
PlayStation Trilithium
Conviva PlayStation Trilithium module autocollects events emitted by Video player. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as seek, backgrounding, metadata, session close, ad-related events.
Add the Conviva PlayStation Trilithium module dependency |
You can add the Conviva PlayStation Trilithium module dependency by choosing one of the following options:
From PlayStation Trilithium module version 4.0.2 onwards, Conviva supports installation through npm and yarn package managers. To install using the npm package manager, use:
To install using the yarn package manager, use:
To download and add the library explicitly from Conviva GitHub, refer: https://github.com/Conviva/conviva-js-playstation-trilithium Refer to this sample code which includes the Conviva modules:
Application need to explicitly implement the system utility functions of Timer, HTTP, Storage Load/Save and Log, Time can be used of Conviva's default ones. Click to view the reference implementation:
|
||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
Connection Type is autocollected by Trilithium module using the
|
||||||||||||||||||||||||||||||
Implement Metadata |
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata metadata definitions for implementation details. |
PlayStation WebMAF
Conviva PlayStation WebMAF module autocollects events emitted by Video player. Therefore, it's not necessary to report these events explicitly by using "reportPlaybackMetric()" API. It's still required to report application events such as metadata, session close, ad-related events.
Add the Conviva PlayStation WebMAF module dependency |
You can add the Conviva PlayStation WebMAF module dependency by choosing one of the following options:
From PlayStation WebMAF module version 4.0.2 onwards, Conviva supports installation through npm and yarn package managers. To install using the npm package manager, use:
To install using the yarn package manager, use:
To download and add the library explicitly from Conviva GitHub, refer: https://github.com/Conviva/conviva-js-playstation-webmaf Refer to this sample code to include the Conviva modules:
Application need to explicitly implement the system utility functions of Storage Load/Save and Timer, HTTP, Log, Time can be used of Conviva's default ones. Click to view the reference implementation:
|
||||
|---|---|---|---|---|---|
Set player reference to Conviva videoAnalytics |
Starting that moment, Conviva library will listen for all relevant events automatically. Metrics monitored by Conviva PlayStation WebMAF module (if applicable):
|
||||
|
Implement Metadata |
To implement the rest of metadata, refer to the above sections of common pre-defined, pre-defined video, and custom metadata definitions for implementation details. |
||||
|
Handle Application Background and Foreground |
Conviva PlayStation WebMAF module autocollects the AppBackground and AppForeground events by monitoring Because of PlayStation WebMAF behavior, applicationStatusChange event doesn't comes when application goes to background but comes after it comes to foreground but Conviva still recommend to handle background events. |
Integrate Ad Managers
Conviva core SDK is universal and player agnostic, therefore it can be used to integrate any Ad SDK using the programming language it's written for.
For ease and speed of integration, Conviva also provides plug-in modules for the most common Ad SDKs.
The modules allow to autocollect events from the particular player / Ad SDK.
If instructions for your Ad SDK are not shown below, please follow the instructions for "Custom Ad Manager" integration, or contact your Conviva representative.
Google IMA
Conviva provides the module to autocollect ad events emitted by IMA SDK. Therefore, it's not necessary to report these events explicitly by using core SDK APIs.
Add the Conviva IMA module dependency |
You can add the Conviva IMA module dependency by choosing one of the following options:
From Google IMA module version 4.0.3 onwards, Conviva supports installation through npm and yarn package managers. To install using the npm package manager, use:
To install using the yarn package manager, use:
To download and add the library explicitly from Conviva GitHub, refer: https://github.com/Conviva/conviva-js-imasdk Refer to this sample code which includes the Google IMA components first followed by Conviva modules. Via HTML:
Via Import/Require:
|
||||
|---|---|---|---|---|---|
Set Ad Listener to AdAnalytics |
To enable Ad metric & metadata autocollection, pass the adsLoader instance of the IMA SDK along with videoPlayer instance, AD_TAG_URL and preload information to
Metrics monitored by Conviva Google IMA module (if applicable):
|
Google IMA DAI Module
Conviva provides the module to autocollect ad events emitted by Google IMA DAI SDK. Therefore, it's not necessary to report these events explicitly by using core SDK APIs.
Add the Conviva IMA DAI module dependency |
You can add the Conviva IMA DAI module dependency by choosing one of the following options:
From Google IMA DAI module version 4.1.0 onwards, Conviva supports installation through npm and yarn package managers. To install using the npm package manager, use:
To install using the yarn package manager, use:
To download and add the library explicitly from Conviva GitHub, refer: https://github.com/Conviva/conviva-js-daisdk Refer to this sample code which includes the Google DAI components first followed by Conviva modules: Via HTML:
Via Import/Require:
|
||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Set Ad Listener to AdAnalytics |
To enable Ad metric and metadata autocollection, pass the StreamManager and HTMLVideoElement to adAnalytics: IMPORTANT: Once the StreamManager is created, follow the below instructions for every content playback as the streamManager events are de-registered internally on playback end.
Metrics autocollected by Conviva Google IMA DAI module:
|
Handling the Slate Sessions
Slate session enables you to monitor slates. It is created when an AD_PERIOD_STARTED event triggers, and is set to NOT_MONITORED state to avoid affecting metrics. This session is closed with the occurrence of the AD_PERIOD_ENDED event.
Conviva tracks the slate playback between the AD_PERIOD_STARTED and AD_PERIOD_ENDED events. The AD_PERIOD_STARTED event is triggered before the AD_BREAK_STARTED event, and the AD_PERIOD_ENDED event is triggered after the AD_BREAK_ENDED event.
Metrics are not calculated for slate session, if an AD break does not include slates. Metrics are calculated only when the slate starts playing after the ADs. Notably, there isn't a specific event for slates, apart from AD_PERIOD_STARTED and AD_PERIOD_ENDED.
For more information about the stream events see the Google DAI documentation.
Known IMA DAI Limitations
Custom Ad Manager
Report Ad Lifecycle Events |
In case of Custom Ad integration, Conviva does not autocollect any ad metrics or events. Implement the following ad events from your application to Conviva:
In the above methods, the parameter Implement it with respect to the requirements prescribed in the next step. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Implement Ad Metadata |
In case of Custom Ad integration, Conviva does not automatically collect ad metadata, except a few fields for common metadata pulled from the Pre-defined Common Metadata:
Autocollected as the same value from Pre-defined Ad Metadata:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Report Ad Metrics |
Report Ad-video metrics to
Refer to the list of metric keys to be implememted in the table below:
|
API Diagrams for Custom Ad Integration
5. Handle User Actions
Conviva.Analytics.reportAppForegrounded();
Conviva.Analytics.reportAppForegrounded();
videoAnalytics.reportPlaybackEvent(Conviva.Constants.USER_WAIT_STARTED);
videoAnalytics.reportPlaybackEvent(Conviva.Constants.USER_WAIT_ENDED);
Report Network Metrics
Metrics like connection type which is common for all the concurrent playback within one Analytics instance can be reported.
Conviva.Analytics.reportDeviceMetric(/* Conviva.Constants.Network / metricKey, / string */ metricValue):
metricKey: Conviva.Constants.Network type key for reporting Network Metrics.metricValue: Value of the reported network metric.
Refer to the sample code mentioned below:
Conviva.Analytics.reportDeviceMetric(Conviva.Constants.Network.CONNECTION_TYPE, "WiFi");
Data Collection and User Preferences
By default, Conviva does not collect any sets of data and relies on the customer application to pass relevant data for better user analytics. However, the appropriate legal agreement with Conviva is required in order for Conviva to begin collecting data that would be considered PII, personal information, personal data or the like under applicable data privacy laws such as the General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA). Further below in this document, there is a description of the user-preference APIs that control data collection, including opt-out and deletion of data, in compliance with data privacy laws. These APIs are in addition to existing, offline processes for opt-out and data deletion requests.
Use these APIs to set the unique user identifiers, however actual collection of identifiers are contingent upon the customer's legal department providing written instructions to Conviva to begin collection. At the discretion of the customer's legal department, some or all of these identifiers may be collected. Conviva provides this flexibility to allow the customer to determine the precise identifiers to be collected.
Send unique identifier's data such as unique identifier for a device or user, for example deviceId, Mac address, advertisingIdentifier and other identifiers, use the Conviva.Analytics.setUniqueIdentifier(/* object / identifiers, / function */ callback=):
identifiers: JSON object with key value pairs of identifiers and values.callback: Optional callback function that needs to be notified if the identifiers were honored or collected by Conviva. Below mentioned are the sample result messages from Conviva: "Data collection successful"* *"End-user chose to opt-out of personal data collection" "End-user used privacy settings and chose to opt-out of personal data collection"
Control Data Collection and Delete Collected Data
var identifiers = {};
identifiers["androidId"] = "xyzabd123cvqn";
Conviva.Analytics.setUniqueIdentifier(identifiers, function (msg) {
console.log("Result of the setUniqueIdentifier API:" + msg);
});
Set the user preference to collect or stop collecting PII data items using Conviva.Analytics.setUserPreferenceForDataCollection(/* object / identifiers, / boolean */forAllApps):
identifiers:stringkey/value pair, where key indicates a probable data name and value is false/true. A value of false causes the SDK to stop collecting that specific data item.forAllApps:booleanvalue indicates if the preference applies to current app or all apps on the device. A value of true indicates all apps; false indicates only the current app.
|
Control the data collection |
|
|---|
Set the user preference to delete and stop collecting specific data items using Conviva.Analytics.setUserPreferenceForDataDeletion(/* object */ identifiers):
identifiers: string key/value pair, where key indicates a probable data name and value is false/true. A value of false causes the SDK to stop collecting that specific data item.
|
Delete collected data |
|
|---|
Report Custom Events
Player Insight is an advanced feature which allows you to track custom events that are not related to video rendering, but rather specific to your player's functionality. These events and their attributes are then tabulated in the Player Insight dashboard at Conviva VSI (Pulse). Contact your Conviva representative to enable Player Insights in Pulse.
You may send a custom Player Insight event that can be associated with a video playback using the following method:
Report video-related events by the method videoAnalytics.reportPlaybackEvent(/* string / eventType, / object */ eventDetail=):
eventType: Mandatory argument of event type of the video player event ofstringtype.eventDetail: Optional argument of event details of the video player event ofobjecttype.
|
Report video-related events |
|
|---|
Report app-level events by the method Conviva.Analytics.reportAppEvent(/* string / eventType, / object */ eventDetail=):
eventType: Mandatory argument of event type of the app event ofstringtype.eventDetail: Optional argument of event details of the app event ofobjecttype.
|
Report app-level events |
|
|---|
6. Cleanup
At video playback end, call |
|
For Ad content, call |
|
On application exit, or when the Conviva object is destroyed, release the objects |
|
To know about the advanced use cases and the self-validation process, refer to the Conviva JavaScript Sensor Integration page.