Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

comScore Destination


Destination Info
  • Accepts Page, Identify and Track calls.
  • Refer to it as comScore in the Integrations object
Connection Modes
Device-modeCloud-mode
Web Web
Mobile Mobile
Server Server

Segment's comScore destination code is open source and available on GitHub. Feel free to check it out:


Getting Started

getting-started page anchor

comScore is supported on mobile apps and web browsers.


When you enable comScore in the Segment App, your changes appear in the Segment CDN within 45 minutes, and then analytics.js starts asynchronously loading comScore's beacon.js library onto your page. This means you should remove comScore's snippet from your page.

Be sure to input your comScore c2 ID for comScore to start recording data. The c2 ID can be found by clicking on the "Get Tag" button within the Comscore dashboard. You will need to pull out the C2 Value from the comScore script tag. You do not need to copy/paste the entire script tag.


To get started with comScore and Segment, you'll want to first integrate your mobile app with our iOS or Android sources. comScore can only accept data sent directly from their iOS and Android SDKs. For that reason we can only send data directly from our iOS and Android SDKs to comScore. Data recorded in our server-side sources cannot be sent to comScore.

For mobile sources, you will need to enter your comScore c2 ID and Publisher Secret.

iOS

ios page anchor

To install comScore using Segment on iOS, please follow the additional set up steps in the Segment-Comscore iOS repository(link takes you to an external page).

To install comScore using Segment on Android, please follow the additional set up steps in the Segment-Comscore Android repository(link takes you to an external page).


Calling page on web will automatically send a call to comScore's Application Tag, along with any labels mapped in the Beacon Param Map setting.


Calling identify with comScore enabled will automatically set the user attributes provided as labels, passing that information on to comScore. With the mobile destination, we map a Segment identify event to comScore's setPersistentLabelWithName. Identify is not supported in the web destination.


Calling track on events will automatically set the properties of that track call as hidden values in comScore to enhance your reports. With the mobile destination, we map a Segment track event to comScore's notifyHiddenEventWithLabels. Track is not supported in the web destination.


Calling screen on mobile will automatically attribute the name, category and properties on that call to be used in the comScore tool. With the mobile destination, we map a Segment screen event to comScore's notifyViewEventWithLabels. Screen is not supported in the web destination.


Calling flush will clear the offline cache with comScore's flushOfflineCache method.


Note: The video tracking functionality is in beta for mobile only, and requires version 3.0.0 of the Segment-comScore SDK. If you have feedback on or questions about this beta feature, contact us(link takes you to an external page)!

To get started tracking video content through Segment, make sure you are using a media player that has an API which allows you to detect the player state. Refer to our Video Spec and implement video tracking as outlined there. We will map the semantic events to comScore's relevant methods.

When you call Video Playback Started, Segment initializes an instance of the comScore streamingAnalytics class with [streamingAnalytics createPlaybackSession];. It is essential that this event is called in order to continue tracking through comScore's Streaming Tag.

From there we will map to the relevant events on the instance as outlined below:

comScore SpecSegment Video Spec
notifyPauseVideo Playback Paused
notifyBufferStartVideo Playback Buffer Started
notifyBufferStopVideo Playback Buffer Completed
notifySeekStartVideo Playback Seek Started
notifyPlayVideo Playback Seek Completed
notifyPlayVideo Playback Resumed

If the properties.position is passed in, we will call the above methods with the play position.

Playback Properties (Labels)

For each playback event, we will set the following asset labels translated from our video spec to comScore:

comScore LabelSegment Property
ns_st_ciasset_ids(s)
ns_st_mpvideo_player
ns_st_vosound
ns_st_wsfull_screen
ns_st_brbitrate

Note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.

comScore SpecSegment Video Spec
notifyPlayVideo Content Started
notifyPlayWithPositionVideo Content Playing
notifyEndVideo Content Completed

If the properties.position is passed in, we will call the above methods with the play position.

Content Properties (Labels)

comScore LabelSegment Property
ns_st_ciasset_id
ns_st_pnpod_id
ns_st_eptitle
ns_st_snseason
ns_st_enepisode
ns_st_gegenre
ns_st_prprogram
ns_st_pupublisher
ns_st_stchannel
ns_st_cefull_episode

Note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.

comScore SpecSegment Video Spec
notifyPlayVideo Ad Started
notifyPlayWithPositionVideo Ad Playing
notifyEndVideo Ad Completed
comScore LabelSegment Property
ns_st_amiasset_id
ns_st_adtype
ns_st_amttitle
ns_st_pupublisher
ns_st_cltotal_length

Note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.


Additional Video Destinations Specific Options

additional-video-destinations-specific-options page anchor

Example on passing destination specific option values through on iOS:

1
options:@{
2
@"integrations": @{
3
@"com-score" : @{
4
@"c3": @"c3 value",
5
@"c4: @"c4 value",
6
@"c6" : @"c6 value",
7
@"tvAirdate" : @"2017-05-22"
8
}
9
}
10
}

Example for Android:

1
Map<String, Object> comScoreOptions = new LinkedHashMap<>();
2
comScoreOptions.put("c3", "c3 value");
3
comScoreOptions.put("c4", "c4 value");
4
comScoreOptions.put("c6", "c6 value");
5
6
Analytics.with(context).track("Video Playback Started", new Properties(), new Options().setIntegrationOptions("comScore", comScoreOptions));

Video Metrix Dictionary Classification

video-metrix-dictionary-classification page anchor

Represented with the labels c3, c4, c6, these labels determine which entity the clip will credit to in the Video Metrix dictionary. Segment allows you to pass values for these labels as a destination-specific option, since these values will.

These are required fields, so all three of these labels must always be passed. Unused labels must still be passed with the literal string value *null. These values should ONLY appear as part of the video destination, they should not appear or be set in the general mobile destination.

Only mapped on content events. ComScore has two definitions for Airdates: TV Airdate and Digital Airdate.This airdate helps comScore establish monetization windows (live, day +1, day +3, ...) for any given episode or show. The monetization windows are used to calculate commercial and program ratings. Each expects a value in yyyy-mm-dd format.

We allow you to pass in one or the other and map to comScore's labels for each.

tvAirdate : TV Airdate. The date on which the content aired on TV.

digitalAirdate : Digital Airdate. The date on which the content aired digitally.

Classification types are how comScore differentiates between an Ad and Content. Segment allows you to pass in a value for the classification type in two ways:

Ad Classification Type

ad-classification-type page anchor

You can pass in a value for adClassificationType as an integration specific option. Segment defaults to value va00 on all Ad related video tracking events. The values you may dynamically pass in are described by comScore below.

LINEAR - VIDEO ON DEMAND Linear advertisements delivered into a media player and presented before, in the middle of, or after video content is consumed by the user. The advertisement completely takes over the full view of the media player.

video + audio
Linear Pre-Rollva11
Linear Mid-Rollva12
Linear Post-Rollva13

LINEAR - LIVE Linear advertisements delivered before, in the middle of, or after a live stream of content. The advertisement completely takes over the full view of the media player.

video + audio
Linear Liveva21

BRANDED ENTERTAINMENT Media that a user may intentionally view (like content), or it may be served to a user during an ad break (like an advertisement).

video + audio
During Linear Pre-Rollva31
During Linear Mid-Rollva32
During Linear Post-Rollva33
As Contentva34
During Live Streamingva35

Content Classification Type

content-classification-type page anchor

You can pass in a value for contentClassificationType as a destination-specific option. Segment defaults to value vc00 on all Content related video tracking events. The values you may dynamically pass in are described by comScore below.

PREMIUM Content with strong brand equity or brand recognition. Premium content is usually created or produced by media and entertainment companies using professional-grade equipment, talent, and production crews that hold or maintain the rights for distribution and syndication.

video + audio
Short Form Video On Demandvc11
Long Form Video On Demandvc12
Live Streamingvc13

USER-GENERATED Content with little-to-no brand equity or brand recognition. User-generated content (UGC) has minimal production value, and is uploaded to the Internet by non-media professionals.

video + audio
Short Form Video On Demandvc21
Long Form Video On Demandvc22
Live Streamingvc23

BUMPERS Bumpers - also known as billboards or slates - are static promotional items which usually run before content and usually last less than 5 seconds.

video + audio
Bumpersvc99

How does comScore determine platform type?

how-does-comscore-determine-platform-type page anchor

The SDK auto-collects the internal device names, which comScore maps to their reportable Platforms seen broken out in your comScore Direct dashbaord.

How does comScore determine unique devices?

how-does-comscore-determine-unique-devices page anchor

The comScore SDK will collect unique device id's under the hood, so based on this there is some filtering that can happen here. IN order to see a number for this metric, you need to select a Geography, Client ID, and Platform in the comScore dashboard. The All option will not produce a unique device.

How does comScore determine the application name?

how-does-comscore-determine-the-application-name page anchor

Used in the classification from comScore's Audience reporting, comScore retrieves the application name from your app's Info.plist application bundle name as returned by CFBundleName. If you want to override the automatically retrieved value, you can provide a string with your preferred app name.

How does comScore work with ProGuard?

how-does-comscore-work-with-proguard page anchor

If you are using minifyEnabled in your build, you would need to add the following to your proguard-project.txt file.

1
-keep class com.comscore.** { *; }
2
-dontwarn com.comscore.**

The comScore library uses static classes and the code is already optimized. These setting inform ProGuard to add the library as-is.


Segment lets you change these destination settings from the Segment app without having to touch any code.

Property nameTypeRequiredDescription
App Namestring

Optional

This parameter will be sent along with payloads to identify which app the tags and data are coming from.


Auto Updateboolean

Optional

Auto Update allows the comScore SDK to automatically send usage updates to comScore.

Default: true

Auto Update Intervalnumber

Optional

If Auto Update is enabled, this sets how many seconds in between auto updates.

Default: 60

Beacon Param Mapmap

Optional

(Web/A.js Only) Map Segment event properties to comScore Beacon parameters.


c2 IDstring
required

You can find your c2 option when you enter your domain and press Get Tag at comScore Direct(link takes you to an external page). The c2 option is on line 4 of the Tag Code.


Comscore Keywordstring

Optional

(Web/A.js Only) Add your Comscore Keyword value. This will be added to the query string as comscorekw={value}.


Comscore User Consent Labelstring

Optional

(Web/A.js and Android Only) Input the custom property or context field you would like to map to Comscore's user consent label (cs_ucfr). The value should be true / false , 1 / 0 or the [US Privacy String] (https://github.com/InteractiveAdvertisingBureau/USPrivacy/blob/master/CCPA/US%20Privacy%20String.md) value to indicate user consent. When evaluating mappings, Segment will prioritize properties before context fields. If nothing is mapped, Segment will not pass cs_ucfr to Comscore.


Only Auto Update when app in foreground.boolean

Optional

When Auto Update is Enabled, this setting determines whether usage date will be sent only when the app is in the foreground. If your app can provide a user experience from the background, like Push Notifications, then you'll want to set this to false.

Default: true

Publisher Secretstring

Optional

You can find your Publisher Secret option when you enter your domain and press Get Tag at comScore Direct(link takes you to an external page).