Link Search Menu Expand Document

BARB Delegate

Important Do not enable BARB reporting in Echo unless you have been asked to do so.

The BARB delegate is used to report iPlayer video analytics data to BARB.

On-Demand media that is less than 30 seconds long will not be reported to BARB.

Internally the delegate uses the Spring Streams library developed by Kantar Media. For further information see the Kantar BARB wiki.

Table of contents

  1. Enabling BARB reporting
  2. BARB Site code
  3. The BARB device ID cookie
  4. Live consumption
    1. Webcasts
  5. Backgrounding
  6. Offline Mode
  7. Testing

Enabling BARB reporting

BARB is disabled by default.

BARB Site code

When testing your application you may want to set the BARB_SITE_CODE configuration option to a value from the table below. It is not necessary to set this option when reporting ‘live’ data as this is the default value.

Echo Version Live (default) Test
JS bbcdotcom bbcdotcomtest
Android bbcandroid bbcandroidtest
iOS bbcios bbciostest

BARB depends on the value of the following cookies being preserved. This applies to both webviews and HTTP clients. Please ensure that you allow these cookies where appropriate (eg in the Auth Toolkit’s cookie whitelist, etc).

Delegate Domain Cookie Notes
BARB .2cnt.net i00 BARB/Kantar device ID

Live consumption

Since early June 2016 Echo has switched to BARB live reporting method 1.

Earlier Echo releases used the ‘channel only’ method 3 for live reporting.

Echo will report to BARB using:

  • a stream value including the service ID eg live/bbc_one_london
  • a pst value matching the live stream timestamp in seconds eg 1464702095

Example URL:

http://bbcdotcom.2cnt.net/j0=,,,,v=A%201.1.0+app=testapp+pl=mobiletestapp+did=868e10589389fd35+aid=bb97262e90e4ef1f+sy=768+plv=1.0.0.0+sx=1196;+,vt=16+uid=3a8w7ib+stream=live/bbc_one_london+pst=,,0+0+na8vcw;+,1407932109+1407932126+na8vcw;;+sy=360+dur=0+sx=640;;;;?lt=hysmffp1

This makes Echo live reporting dependent on players providing a live timestamp through a PlayerDelegate.

Webcasts

A webcast is usually expressed to Echo as a live media item with a version PID (no service ID). In this scenario Echo will use the ESS API to determine the service ID associated with the webcast version eg sport_stream_04.

If Echo is unable to identify a service ID using the ESS API the stream will be reported as live/no-service-id-found.

Backgrounding

On platforms that allow applications to be backgrounded (iOS, Android) Echo will automaticaly stop BARB tracking whenever you call EchoClient.appBackgrounded() (or automatically on iOS). BARB tracking will not start again until you call EchoClient.avPlayEvent() (usually after foregrounding and resuming playback).

Offline Mode

The Spring library features an offline mode that:

  • stores events when a device has no network connection
  • transmits the events to BARB when a connection becomes available

Offline mode is enabled by default. To disable Offline collection you will need to set the BARB_OFFLINE_MODE configuration flag to false (see advanced config). Kantar documentation around Offline Mode can be found here.

Note that this is separate from Echo’s general cache mode config, you can have cache mode off but still have BARB offline mode on. Make sure that if you want to change the default behaviour you have set both of these options as desired.

Testing

As a product implementing BARB reporting it is your responsibility to do this and understand the steps that must be taken prior to enabling live reporting. It will be necessary to communicate with both the Analytics Services team as well as Kantar to co-ordinate this.

It is possible to examine BARB requests using Charles or a similar proxy, or the Echo Chamber application. For more information regarding testing your product please refer to our testing documentation.