If you use the Brightcove player and
catalog included in the SDK to retrieve and play videos, analytics data will be automatically collected and will appear in the Video Cloud Analytics module.
If you override the
BrightcoveVideoView class or do not use the Brightcove player and catalog, you need to send your Account Id to Video Cloud Analytics.
As of version 8.0.0 of the Brightcove Mobile SDK for Android, you can send the following custom values from your app to Brightcove Analytics:
- Destination URI
- Source URI
You can set the Destination and Source URIs if you choose. The default values are based on the application package name.
These properties can be set in your Android
MainActivity class file:
brightcoveVideoView = (SeamlessVideoView) findViewById(R.id.brightcove_video_view); Analytics analytics = brightcoveVideoView.getAnalytics(); analytics.setDestination("valid URI"); analytics.setSource("valid URI");
Video.Fields.PUBLISHER_ID property to set the Account Id value in Brightcove Analytics. This property will be useful only in cases where there is no
accountID value in the video's metadata (for example, if your app uses a mix of Video Cloud videos, which contain the
accountID property, and non-Video Cloud videos, which will not contain the
For example, you can set the Account Id value when creating a remote Video object using the Native SDK for Android:
Video video = Video.createVideo("http://url.to.content/master.m3u8", DeliveryType.HLS); video.getProperties().put(Video.Fields.PUBLISHER_ID, "your accountID");
When you set the
Video.Fields.PUBLISHER_ID property, the value of this property will be used for this remote video only. It will not affect the reporting of any VideoCloud videos you may also use. The most useful value for this property is your Account Id. These videos will be reported in the Analytics module as Other/Third Party since Brightcove Analytics does not currently support detailed reporting for videos that are not retrieved through the Brightcove Catalog service.
destination property to set the value of the location that originates the event. The value of the destination property MUST be in proper URI format, similar to this example:
The default value the destination property is
bcsdk:// followed by the app name, followed by the package name.
For example, in the Android SDK HLS Sample App, the destination value would be:
Any screen in your app that instantiates a
brightcoveVideoView can set this destination override to a distinct value, to better track video views within the app itself.
source property to set the URI that sent the end-user to the destination URI. As with the destination value, the value of the source property MUST be in proper URI format, similar to this example:
The default value of the source property is null. When the value is null, the source property is not sent to the Analytics server.
For example, you can set the source property as follows:
Note: For more details about URI structures for use in the destination and source fields, see the URI Scheme Wikipedia page. You can use a tool like this URL Encoder to convert characters into UTF-8 encoding format.
In the Video Cloud Analytics module, you can view metric data at the account level or at a detailed level such as by video.To learn how, view the following docs:
Note: Brightcove Analytics converts the destination and source values you’ve set to an all lower-case string value in all reports.