import { IntegrationElement } from '@turbo-player/integration-web-component'; /** * Connect to Nielsen tracking. * Returns a cleanup function that should be called when tracking is no longer needed. * * Nielsen does not require consent checks and uses a synchronous stub pattern, * so events can be sent immediately and are queued until the SDK loads. */ export declare const connectToNielsen: (integration: IntegrationElement, options: NielsenOptions) => (() => void); /** * Nielsen ad metadata type. * Use NielsenAdMetadataBase for generic implementations or * NielsenAdMetadataDE for Germany-specific implementations. */ export declare type NielsenAdMetadata = NielsenAdMetadataBase | NielsenAdMetadataDE; /** * Base ad metadata fields for Nielsen tracking. * Allows any additional key/value string pairs for country-specific fields. */ export declare interface NielsenAdMetadataBase { /** Unique ID assigned to ad (max 64 chars, only 0-9, a-z, A-Z, underscore, minus) */ assetid: string; /** Type of ad: 'preroll', 'midroll', or 'postroll' (max 8 chars) */ type: 'preroll' | 'midroll' | 'postroll'; /** Allow additional custom variables for country-specific fields */ [key: string]: string | undefined; } /** * Nielsen ad metadata for Germany (DE). * Uses AGF-specific custom variables (nol_c*). * The nol_c* fields are automatically prefixed with "p{n}," by transformMetadata. * @see AGF Custom Variables and Metadata DCR SDK v1.10 */ export declare interface NielsenAdMetadataDE extends NielsenAdMetadataBase { /** Length of ad in seconds as string (max 8 chars) */ length: string; /** Ad title/identifier (max 255 chars) - same as Ad ID / nol_c11 */ title: string; /** Client ID / Parent ID (max 9 chars) - unique identifier for the system participant (optional, set automatically by AppID, can be overwritten) */ clientid?: string; /** Sub-brand/VCID identifier provided by Nielsen (max 3 chars) */ subbrand?: string; /** nol_c10: Publisher name (max 255 chars) - channel/brand owner */ nol_c10: string; /** nol_c11: Ad ID (max 255 chars) - provider-specific unique identifier for the ad */ nol_c11: string; /** nol_c12: Video type (max 7 chars) - always "Werbung" for ads */ nol_c12: string; /** nol_c17: Placement type (max 9 chars) - "preroll", "midroll", "postroll", or "other" */ nol_c17: string; /** nol_c1: Universal Ad ID (max 255 chars) - agency identifier + campaign identifier, empty if not available - optional */ nol_c1?: string; /** nol_c2: Web only flag (max 1 char) - must match content's web-only status ("Y" = web only, "N" = also on linear TV) - optional */ nol_c2?: string; /** nol_c4: Form of advertising (max 255 chars) - e.g., "preroll", "midroll", "postroll", "pre-split", "sponsor" - optional */ nol_c4?: string; /** nol_c16: Content ID / Offer unit code (max 255 chars) - for service unit assignment - optional */ nol_c16?: string; /** nol_c18: Livestream flag (max 1 char) - whether ad is playing during livestream ("Y") or VOD ("N") - optional */ nol_c18?: string; } /** * Nielsen content metadata type. * Use NielsenContentMetadataBase for generic implementations or * NielsenContentMetadataDE for Germany-specific implementations. */ export declare type NielsenContentMetadata = NielsenContentMetadataBase | NielsenContentMetadataDE; /** * Base content metadata fields for Nielsen tracking. * Allows any additional key/value string pairs for country-specific fields. * @see https://engineeringportal.nielsen.com/wiki/International */ export declare interface NielsenContentMetadataBase { /** Unique ID assigned to content (max 64 chars, only 0-9, a-z, A-Z, underscore, minus) */ assetid: string; /** Type of asset - always "content" for content (max 8 chars) */ type: 'content'; /** Name of program/show (max 255 chars, UTF-8, no backslash) */ program: string; /** Episode/content title (max 255 chars, UTF-8, no backslash) */ title: string; /** Length of content in seconds as string (max 8 chars). Use "86400" for live streams */ length: string; /** Allow additional custom variables for country-specific fields */ [key: string]: string | undefined; } /** * Nielsen content metadata for Germany (DE). * Uses AGF-specific custom variables (nol_c*). * The nol_c* fields are automatically prefixed with "p{n}," by transformMetadata. * @see AGF Custom Variables and Metadata DCR SDK v1.10 */ export declare interface NielsenContentMetadataDE extends NielsenContentMetadataBase { /** Client ID / Parent ID (max 9 chars) - unique identifier for the system participant (optional, set automatically by AppID, can be overwritten) */ clientid?: string; /** Sub-brand/VCID identifier provided by Nielsen (max 3 chars) */ subbrand?: string; /** nol_c0: Video part number (max 255 chars) - "0" = one-part video, "1", "2", etc. for multi-part */ nol_c0: string; /** nol_c2: Web only flag (max 1 char) - "Y" = web only content, "N" = also on linear TV */ nol_c2: string; /** nol_c7: Video ID (max 255 chars) - unique identifier for the video content */ nol_c7: string; /** nol_c9: Video title (max 255 chars, no backslash) - format: "programBrand|episodeTitle" or "24_7 livestream" for livestreams */ nol_c9: string; /** nol_c10: Publisher name (max 255 chars) - channel/brand owner */ nol_c10: string; /** nol_c12: Video type (max 7 chars) - "Content", "Trailer", or "Werbung" */ nol_c12: string; /** nol_c18: Livestream flag (max 1 char) - "Y" = livestream, "N" = VOD/trailer */ nol_c18: string; /** nol_c5: Full page URL where the stream is available (max 255 chars) - optional */ nol_c5?: string; /** nol_c13: Miscellaneous 1 (max 255 chars) - field for use by system participants - optional */ nol_c13?: string; /** nol_c14: Not in use 2 (max 255 chars) - reserved for AGF - optional */ nol_c14?: string; /** nol_c15: Format ID (max 255 chars) - for TV matching (external ID/IDEC), empty for web-only or livestream - optional */ nol_c15?: string; /** nol_c16: Content ID / Offer unit code (max 255 chars) - for service unit assignment - optional */ nol_c16?: string; /** nol_c19: Miscellaneous 2 (max 255 chars) - field for use by system participants - optional */ nol_c19?: string; } /** * Options for Nielsen provider */ export declare interface NielsenOptions { /** Nielsen App ID */ appId: string; /** * Two-letter country code for loading the appropriate Nielsen data mapping. * Country-specific metadata builders are used automatically. * @example 'de' - Germany (uses AGF-specific custom variables) */ country: string; /** Enable Nielsen SDK debug mode */ debug?: boolean; /** Optional callback for warning messages */ warnCallback?: (error: Error) => void; /** * Callback to extend or modify content metadata before tracking. * Called once per content when playback starts. * Use `integration.content` to access additional content data if needed. * * When `country` is specified, receives country-specific metadata as input. * When `country` is not specified, receives base metadata. * * @param baseMetadata - Base metadata built from integration data containing `assetid`, `type`, `program`, `title`, and `length` * @returns Extended metadata object with additional Nielsen-required fields, or `null`/`undefined` to skip tracking this content * * @example * ```ts * configureContentMetadata: (baseMetadata) => ({ * ...baseMetadata, * program: 'My Program', * segB: 'category', * segC: 'subcategory' * }) * ``` */ configureContentMetadata?: (baseMetadata: NielsenContentMetadataBase) => NielsenContentMetadata | null | undefined; /** * Callback to extend or modify ad metadata before tracking. * Called on each linear ad impression (preroll, midroll, postroll). * Use `integration.currentAd` to access additional ad data if needed. * * When `country` is specified, receives country-specific metadata as input. * When `country` is not specified, receives base metadata. * * @param baseMetadata - Base metadata built from integration data containing `assetid` and `type` (preroll/midroll/postroll) * @returns Extended metadata object with additional Nielsen-required fields * * @example * ```ts * configureAdMetadata: (baseMetadata) => ({ * ...baseMetadata, * title: 'Ad Title' * }) * ``` */ configureAdMetadata?: (baseMetadata: NielsenAdMetadataBase) => NielsenAdMetadata; } export { }