Moat is an analytics service maintained by Oracle. THEOplayer offers a pre-integration for this solution. A demo can be found at https://demo.theoplayer.com/moat-analytics-pre-integration.
Web SDK | Android SDK | iOS SDK | tvOS SDK | Android TV SDK | Chromecast SDK |
---|---|---|---|---|---|
Yes | Yes | Yes | No | Yes | Unverified |
The THEOplayer Android SDK supports Moat analytics (version 2.4.3+) out-of-the-box. Below you can find the steps to enable Moat tracking.
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile (name: 'moat-mobile-app-kit', ext:'aar')
}
dependencies {
compile 'com.google.android.gms:play-services-ads:+'
compile 'com.android.support:support-v4:+'
}
import android.app.Application;
import com.moat.analytics.mobile.moatnamespace.MoatAnalytics;
public class MyApplication extends Application {
@Overridepublic void onCreate() {
super.onCreate();
THEOplayerGlobal.getSharedInstance(this).setApplicationInstance(this);
}
}
THEOplayer supports Moat Analytics integration from Moat SDK version 3.6.0+. This integration is only available upon request.
Once you've received a build which has THEOplayer's Moat integration, you have to import the Moat framework:
import DMSMoatMobileAppKit
The snippets below explain how you can pass on Moat settings to a THEOplayer configuration object.
Configure the Moat partner code.
new THEOplayer.Player(containerElement, {
libraryLocation: "https://cdn.theoplayer.com/dash/theoplayer/",
analytics: [
{
integration: "moat",
partnerCode: "<PARTNER_CODE>",
},
],
})
When you want to make use of Moat for tracking advertisements, you should make use of the GoogleImaAdDescription.
Configure the Moat partner code and namespace and enable Google IMA
new THEOplayerConfig.Builder()
.googleIma(true)
.analytics(new MoatOptions.Builder("NAMESPACE", "<PARTNER_CODE>").loggingEnabled(true).build())
.build();
When you want to make use of Moat for tracking advertisements, you should make use of the GoogleImaAdDescription.
Enable Google IMA in your THEOplayer instance:
let config = THEOplayerConfiguration(defaultCSS: true, googleIMA: true)
let theoplayer = THEOplayer(configuration: config)
Configure a Google IMA source with Moat Analytics enabled:
public static var moatPreroll : SourceDescription {
let typedSource = TypedSource(src: "<HLS_STREAM_URL>", type: "application/x-mpegurl")
return SourceDescription(
source : typedSource,
ads: [
GoogleImaAdDescription(src: "<AD_TAG_URL>")],
analytics: [MoatOptions(partnerCode: "<PARTNER_CODE>", debugLoggingEnabled: true)]
)
}