comScore Destination

Segment makes it easy to send your data to comScore (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to comScore in the format they understand. Learn more about how to use comScore with Segment.

Our comScore destination code is open-source on GitHub if you want to check it out! For Analytics.js. For Analytics-iOS. For Analytics-Android

Getting Started

Analytics.js

When you toggle on comScore in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading comScores’s beacon.js onto your page. This means you should remove comScore’s snippet from your page.
  • comScore will automatically start recording data.

Mobile

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. Be sure to follow the additional setup steps to get started, which you can find here for iOS and here for Android.

With the recent comScore update, there is an additional implementation step when getting started with comScore Android. Please be sure to add this to your gradle file:

allprojects {
  repositories {
    maven {
      url "https://comscore.bintray.com/Analytics"
    }
  }
}

Settings

Once the Segment source is integrated with your app, toggle comScore on in your Segment destinations catalog, and add your C2 Value, also known as the client ID, and Publisher Secret Code which you can find in your comScore Direct settings.

These new settings will take up to an hour to propagate to all of your existing users. For new users it’ll be instantaneous!

App Name

You can include your App Name which will be included in all payloads. comScore retrieves the application name from your app’s Info.plist application bundle name as returned by CFBundleName . This value is used in the classification from comScore’s Audience reporting. If you want to override the automatically retrieved value, you can provide a string with your preferred app name.

HTTPS

We default Use HTTPS to true so that your data is always sent encrypted.

Auto Update

We enable you to choose if you want the comScore SDK to update the application usage times on regular intervals.

By default, we have Foreground Only on. this means we’ll only update usage times when your app is in the foreground, if you uncheck this then we will update usage times even when your app is backgrounded. This is recommended if your app can deliver a user experience while the app is backgrounded, Push Notifications being a common example.

You may also choose to turn off Foreground Only, which leaves AutoUpdate enabled, which updates the application usage times when the app is both foregrounded and backgrounded.

If you turn off AutoUpdate, we will disable Auto Update mode but note that this is not advised.

We also allow you to configure the Auto Update Interval which controls how often the SDK updates usage information. This defaults to 60 seconds.

Identify

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.

Track

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.

Screen

Calling screen 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.

Flush

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

Video Streaming

Disclaimer: The video tracking functionality is in beta. If you have feedback on this beta functionality, please reach out to us via our contact form. In addition, you must be using version 3.0.0 of the Segment-comScore SDK for this functionality.

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. Please also refer to our Video Spec and implement video tracking as outlined there. We will map the semantic events to comScore’s relevant methods.

Playback Events

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.

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

Please take note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.

Content Events

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

Please take note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.

Ad Events

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

Please take note that iOS and Android expect different casing. We expect snake_case for iOS and camelCase for Android.

Additional Video Destinations Specific Options

Example on passing destination specific option values through on iOS

```objective-c options:@{ @”integrations”: @{ @”comScore” : @{ @”c3”: @”c3 value”, @”c4: @”c4 value”, @”c6” : @”c6 value”, @”tvAirdate” : @”2017-05-22” } } }


Example for Android:

```java Map<String, Object> comScoreOptions = new LinkedHashMap<>();
comScoreOptions.put("c3", "c3 value");
comScoreOptions.put("c4", "c4 value");
comScoreOptions.put("c6", "c6 value");

Analytics.with(context).track("Video Playback Started", new Properties(), new Options().setIntegrationOptions("comScore", comScoreOptions));

Video Metrix Dictionary Classification

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 an 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.

Airdates

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 Type

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

You can pass in a value for adClassificationType as an integratino specific option. Segment defaults to value aa00 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.

va21

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).

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

Content Classification Type

You can pass in a value for contentClassificationType as an 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.

vc99

FAQ

How does comScore determine platform type?

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?

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?

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.


Supported Sources and Connection Modes

WebMobileServer
📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

This destination requires a Device-based Connection Mode for Mobile data. Follow the steps above to ensure you have packaged the comScore SDK with Segment’s.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

c2 ID

You can find your c2 option when you enter your domain and press Get Tag at comScore Direct. The c2 option is on line 4 of the Tag Code.

Only Auto Update when app in foreground.

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.

Publisher Secret

You can find your Publisher Secret option when you enter your domain and press Get Tag at comScore Direct.

Use HTTPS

If true, this will ensure all data is sent to comScore via HTTPS.

App Name

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

Auto Update

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

Auto Update Interval

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


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!