UKOM reporting
Important: Reporting to IPSOS is important for ensuring the BBC meets with UKOM reporting requirements.
It’s enabled by default, but you must provide the correct API Key as outlined below.
UKOM reporting is provided by the Dotmetrics library from IPSOS.
This integration is available for iOS and Android only.
Table of contents
- Integration
- Enabling UKOM reporting iOS
- Enabling UKOM reporting Android
- How does one start UKOM tracking?
- Validating your integration of the IPSOS Dotmetrics framework
Integration
Integration is simple and requires only a few steps.
- 1) you must use a version of Echo with UKOM reporting enabled (echo-client-ios-swift 6.6.2, echo-client-android 19.5.0 minimum)
- 2) you must get your API Key from IPSOS (or our handy Dropbox document)
- 3) Follow the guide in the next section to correctly set up your project to enable UKOM reporting
If you do not want to enable UKOM reporting then you must disable “UKOM_ENABLED” via a config option (see Advanced Config).
Enabling UKOM reporting iOS
You must provide your API Key as a config option. You’re probably already setting other config options, so it’s as simple as adding the following:
var config:Dictionary<EchoConfigKey, String>
config[.ukomApiKey] = "0a00a00a-00aa-0a0a-a0aa-000a00a00000"
// Instantiate Echo Client
do {
echo = try EchoClient(appName: "AppName",
appType: .mobileApp,
config: config,
bbcUser: user)
} catch {
// Handle Echo config error
}
Where the 0a00a00a-00aa-0a0a-a0aa-000a00a00000
needs to be replaced with the App’s correct api key in the UUID format.
Enabling UKOM reporting Android
To use the new framework, Apps will be required to pass an api key into their res/values/strings.xml
file as follows:
<string name="analytics_config_url">https://uk-script.dotmetrics.net/MobileSdk.plist?apiKey=0a00a00a-00aa-0a0a-a0aa-000a00a00000</string>
Where the 0a00a00a-00aa-0a0a-a0aa-000a00a00000
needs to be replaced with the App’s correct api key in the UUID format.
Next you have to add a new repository to your build.gradle
file
maven { url '
https://jitpack.io
' }
e.g.:
allprojects {
repositories {
mavenLocal()
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
You are also required to use a new constructor for EchoClient. The old one is now deprecated. Here is a quick start example:
public EchoClient(String appName,
ApplicationType appType,
String startCounterName,
Context context,
HashMap<String, String> config,
BBCUser bbcUser,
Application application
);
import uk.co.bbc.echo.EchoClient;
import uk.co.bbc.echo.EchoConfigKeys;
import uk.co.bbc.echo.Media;
import uk.co.bbc.echo.enumerations.MediaAvType;
import uk.co.bbc.echo.enumerations.MediaForm;
import uk.co.bbc.echo.enumerations.ApplicationType;
import uk.co.bbc.echo.enumerations.MediaRetrievalType;
import uk.co.bbc.echo.enumerations.MediaConsumptionMode;
import uk.co.bbc.echo.enumerations.MediaScheduleMode;
import uk.co.bbc.echo.enumerations.PIPsType;
import android.app.Application;
public class TestShellApplication extends Application {
public void initialiseEcho(HashMap<String, String> config) {
config.put(EchoConfigKeys.DESTINATION, Destination.FOOD.toString());
EchoClient echo = new EchoClient(
"MyApp", // App Name
ApplicationType.MOBILE_APP, // App Type
"echo.android.test", // App start countername (no longer used for ATI)
getApplicationContext(), // The Android Context of your Application
config, // config options HashMap
bbcUser, // BBCUser instance
this // Application instance of your Application
);
}
}
How does one start UKOM tracking?
IPSOS’ Dotmetrics framework will be initialised when you initialise Echo (unless you provide a signed-in user with personalisation disabled at initialisation, as this type of user will be opted out of tracking).
Validating your integration of the IPSOS Dotmetrics framework
First, you MUST use the correct API Key for your product. Once you initialise Echo (with the above exception noted) you should be able to see requests to uk-script.dotmetrics.net in Charles or a similar network proxy application. However to be absolutely sure it is necessary to check the data is arriving in the IPSOS backend.
If you do not have access, please contact CCOG who are able to check for you. If you’re unsure how to do this, you may email the Analytics Support Team or contact us on the #help-echo Slack channel.