Template

Template:iOS Configure Metadata

From Engineering Client Portal

Configure Metadata

All the SDK methods handles only two types of objects: NSString, NSDictionary. The parameters passed must be either a JSON formatted string or a NSDictionary object. The JSON passed in the SDK must be well-formed.

  • NSDictionary object
    • If an object of unexpected type is passed to the method, the error message will be logged.
    • If string has invalid JSON format, the error message will be logged.
  • JSON value must be string value.
    • This includes boolean and numeric values. For example, a value of true should be represented with "true", number value 123 should be "123".
    • All the Nielsen Key names (e.g. appid, program) are case-sensitive. Use the correct variable name as specified in the documentation.
  • JSON string can be prepared using either raw NSString or serialized NSDictionary.


Create channelName Metadata

channelName should remain constant throughout the completion of an episode or live stream.

Key Description Values Required
channelName Any string representing the channel/stream custom

Create Content Metadata

Content metadata should remain constant throughout the entirety of an episode/clip including when ads play.

program and title metadata values should be passed to SDK as UTF-8 strings.

Keys Description Values Required Provider
type Type of asset For Video use: content
For Static or text static
Yes Nielsen
assetid Unique ID assigned to asset
Note: Refrain from using the following special characters (Special Characters).
Examples:
BBT345a234
CBSs5e234F2021
Yes Client
program Complete program or movie title
(no abbreviations or shorthand)
Note: there is a 25 character limit.
The Big Bang Theory
TheBigBangTheory
The Dark Knight
TheDarkKnight
Yes Client
title Episode title with season and episode number (40 character limit)
(Formats accepted: S01E03, S1E3, S1 E3).
Examples:
The Pants Alternative S03E18
The Pants Alternative S3E18
The Pants Alternative S3 E18
Can also accept: S3E18
Not Valid: 318 or 0318
Yes Client
crossId1 Gracenote TMS ID (If available) should be passed for all telecasted content for clients using the Gracenote solution for proper matching purposes.
Note: The TMS ID will be a 14 character string. Normally leading with 2 alpha characters ('EP', 'MV', 'SH' or 'SP'), followed by 12 numbers.
The TMS ID will be a 14 character string.
Normally being with 'EV,' 'EP', 'SH', 'SP', or 'MV'
Followed by 12 numbers after the initial two letter prefix.

The Giant Morning Show: SH009311820022
The Pants Alternative Episode : EP009311820061
Optional Nielsen
crossId2 Populated by content distributor to contribute viewing from that distributor to the given content originator. Custom
For a full list of acceptable values, please contact your Nielsen reprentative.
Yes, for distributors Nielsen
length Length of content in seconds
Note: Integers and decimal values are acceptable for the length parameter.
Examples:

For standard VOD content - 300 to represent 5 minutes, 1320 to represent 22 minutes, etc.
If DAI live stream of a discrete program (Live Event/Sporting Event), pass length of content. See example for standard VOD content above.
If unknown DAI live steam, pass a value of 0.

Yes Client
airdate Original broadcast or release date for the program
For USA, date should be EST
Outside USA, date should be local time.
If not applicable or available, original broadcast or release date for the Program.
Acceptable Formats:
YYYY-MM-DDTHH:MI:SS
YYYY-MM-DDHH:MI:SS
YYYY-MM-DDTHH:MI:SS+xx:xx
YYYY-MM-DDTHH:MI:SS-xx:xx
YYYYMMDDHH:MI:SS
YYYYMMDD HH:MI:SS
MM-DD-YYYY
MM/DD/YYYY
YYYYMMDD
Yes Client
isfullepisode Full episode flag to identify differences between long form content. y- full episode, n- non full episode(clip,teaser,promo,etc.)

Also accept:
lf or yes- longform
sf or no- shortform

Yes Nielsen
adloadtype Type of ad load:

1 Linear – matches TV ad load
2 Dynamic – Dynamic Ad Insertion (DAI)

2 - DCR measures content with dynamic ads Yes Nielsen
segB One of two custom segment for the clients granular reporting within a brand. Examples:
Genre - horror, comedy, etc.
Timeslot - primetime, daytime, etc.
News type - breakingnews, weather, etc.
Optional Client
segC One of two custom segment for the clients granular reporting within a brand. Examples:
Genre - horror, comedy, etc.
Timeslot - primetime, daytime, etc.
News type - breakingnews, weather, etc.
Optional Client

Custom segments (segB and segC) can be used to aggregate video and/or static content within a single Brand to receive more granular reports within a brand.

Examples regarding usage of segments within SDK:

  • All comedy clips and stories for a Brand rolled into a "Comedy" segment
  • genre grouping content by Comedy vs. Drama
  • group related Text + Video content - i.e. for a show that has a lot of - static pages associated with it
  • packaging based on how clients sell inventory
  • grouping related types of content either by genre, category or platform.


Metadata Example

Swift

let contentMetadata = [
    "type": "content",
    "assetid": "C77664",
    "program": "The Big Bang Theory",
    "title": "The Pants Alternative S03E18",  //Formats accepted: S01E03, S1E3, S1 E3
    "crossId1": "EP009311820061", //optional
    "crossId2": "Content Originator", //optional
    "length": "3600",
    "airdate": "2022-03-21T10:05:00", 
    "isfullepisode": "Yes",
    "adloadtype": "2",
    "segB": "CustomSegmentValueB", //optional
    "segC": "CustomSegmentValueC" //optional

];


Objective-C

 
NSDictionary * contentMetadata = @ {
    @ "type": @ "content",
    @ "assetid": @ "C77664",
    @ "program": @ "The Big Bang Theory",
    @ "title": @ "The Pants Alternative S03E18", //Formats accepted: S01E03, S1E3, S1 E3
    @ "crossId1": @ "EP009311820061", //optional
    @ "crossId2": @ "Content Originator", //optional
    @ "length": @ "3600",
    @ "airdate": @ "2022-03-21T10:05:00",
    @ "isfullepisode": @ "y",  
    @ "adloadtype": @ "2",
    @ "segB": @ "CustomSegmentValueB", //optional
    @ "segC": @ "CustomSegmentValueC" //optional

}

Ad Metadata

The Ad Metadata (if applicable) should be passed for each individual ad.

Keys Description Values Required
type type of Ad 'preroll', 'midroll', 'postroll'
'ad' - If specific type can not be identified.
assetid unique ID assigned to Ad custom
(no Special Characters)

Example Ad Object

// create Ad object
"ad": {
  "type": "preroll",
  "assetid": "AD-ID123"
}

Configure Static Metadata if Applicable

The below is to measure Static Content.

The Nielsen reserved keys are:

Key Description Data Type Value Required?
type asset type fixed 'static' Yes
section section of each site (e.g. section value should be first level in page URL: website.com/section). Limit to 25 unique values dynamic custom
(no Special Characters)
Yes
segA custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No
segB custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No
segC custom segment for reporting: Limit to 25 unique values across custom segments (segA + segB + segC) dynamic custom No

The values passed through the Nielsen keys will determine the breakouts that are seen in reporting. The custom segments (A, B & C) will roll into the sub-brand. To not use custom segments A, B and C, do not pass any value in these keys.

Aggregation Limits There are limits on the number of unique values that can be aggregated on in reporting. The specific limitations by key are:

Key Aggregation Limit
section maximum of 25 unique values (section <= 25)
segA Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)
segB Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)
segC Maximum number of unique values allowed across segA, segB, and segC is 25 (segA + segB + segC<= 25)

Example Static Object

        let staticData =
            [
                "type": "static",
                "section": "Section Name",
                "segA": "segmentA",
                "segB": "segmentB",
                "segC": "en-us"
        ]