comScore Device Mode Integration

Send events to comScore using RudderStack device mode.

After you have successfully set up comScore as a destination in RudderStack, follow this guide to correctly send your events to comScore in device mode.

Add device mode integration

Follow these steps to add comScore to your project depending on your integration platform:

Supported events

info

Note that:

  • RudderStack supports sending only page events in web device mode.
  • You can send the other events (Identify, Track, Screen, Reset) in mobile device mode.

Identify

You can use the identify call to set the user ID and traits as persistent labels in comScore.

RudderStack maps the identify events to comScore’s addPersistentLabels API, followed by making a call to comScore’s notifyHiddenEvent API.

A sample identify call is shown:

RudderClient.getInstance()?.identify(
            "1hKOmRA4GRlm",
            RudderTraits()
                .putEmail("alex@example.com")
                .put("trait_key_1", "trait_value_1")
                .put("trait_key_2", 4567),
            null
        )

Track

You can use the track call to record user actions. RudderStack also sends any associated properties as labels to comScore.

RudderStack maps the track events to comScore’s notifyHiddenEvent API.

A sample track call is shown:

RudderClient.getInstance()?.track(
            "Event name",
            RudderProperty()
                .putValue("property_track_key_1", "property_value_1")
                .putValue("property_track_key_2", 987654)
                .putValue("prop3", "value3")
        )

Page

info
RudderStack supports sending only page events in web device mode.

You can use the page call to record page views and capture any properties about the viewed page.

A sample page call is shown:

rudderanalytics.page({
  category: "Category",
  name: "Sample",
})

RudderStack maps the following comScore Publisher Tag parameters:

comScore IDDescriptionNotes
C1
Required
Tag typePre-populated with a constant value of 2.
C2
Required
comScore Client IDSet as the Publisher ID obtained from the dashboard.

Default mappings

If you do not specify any mappings in the Map RudderStack page properties to comScore parameters dashboard setting, RudderStack uses the following default mappings for the page event:

RudderStack page propertyData typecomScore parameter
properties.urlStringC4
nameStringC5
info
All other parameters get auto-populated by comScore.

See the comScore documentation for more information on the Publisher Tag parameters you can send for improved classification and reporting.

You can pass consent information to comScore in any of the following ways:

You can pass the consent information to comScore by leveraging RudderStack’s consent management feature. Make sure to specify the consent settings in the dashboard.

warning
RudderStack recommends initializing the JavaScript SDK only after the consent is obtained.

Via the integrations object

RudderStack supports passing the consent information manually while loading the SDK, by including the integrations object during initialization — this object includes a consent field where you can pass the consent status.

A sample integrations object is shown:

rudderanalytics.load(WRITE_KEY, DATA_PLANE_URL, {
  integrations: {
    All: Boolean, // Default is true
    COMSCORE: {
      consent: {
        cs_ucfr: true // Consent value forwarded to comScore
      }
    },
    ...
  }
});

Screen

You can use the screen call to record whenever a user views their mobile screen and capture any properties about the viewed screen.

RudderStack maps the screen events to comScore’s notifyViewEvent API.

A sample screen call is shown:

RudderClient.getInstance()?.screen(
            "Screen event name",
            RudderProperty()
                .putValue("property_screen_key_1", "property_value_2")
                .putValue("property_screen_key_2", 9876542)
        )
info
For both track and screen events, RudderStack maps the event name with comScore’s name field. It sends all the other properties to comScore as is, without any modifications.

Reset

Use the reset call to reset userId and the associated traits.

A sample reset call is shown:

RudderClient.getInstance()?.reset(true)

FAQ

Where can I find the comScore Publisher ID?

You can find the comScore Publisher ID by logging in to your comScore Direct account.

Mobile
  1. Log in to your comScore Direct account.
  2. Go to the Mobile app tab.
  3. Click Get Tag and copy the C2 value.
comScore Publisher ID
Web
  1. Log in to your comScore Direct account.
  2. Click Get Tag.
comScore Get Tag option
  1. In the Website Tag popup, copy the value corresponding to the C2 field.
comScore Publisher ID

Questions? Contact us by email or on Slack