Package com.brightcove.player.analytics
Class Analytics
- java.lang.Object
-
- com.brightcove.player.event.AbstractComponent
-
- com.brightcove.player.analytics.Analytics
-
- All Implemented Interfaces:
Component
@Emits(events={"account","didSetAnalyticsBaseParams","error"}) @ListensFor(events={"account","activityStarted","activityStopped","activityDestroyed","adBreakStarted","adBreakCompleted","adProgress","addAnalyticsBaseParams","analyticsCatalogRequest","analyticsCatalogResponse","analyticsVideoEngagement","bufferingCompleted","bufferingStarted","completed","didPause","didPlay","didSeekTo","didSetVideo","error","fragmentStarted","fragmentStopped","fragmentDestroyed","play","progress","setAnalyticsBaseParams","version","videoDurationChanged","videoSizeKnown","willChangeVideo","videoDownloadStarted","videoDownloadCompleted","videoDownloadCancelled","videoDownloadFailed"}) public class Analytics extends AbstractComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Analytics.Fields
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
destination
The value that will be passed as the 'destination' parameter for all analytics events.static java.lang.String
TAG
-
Fields inherited from class com.brightcove.player.event.AbstractComponent
eventEmitter, listenerTokens
-
-
Constructor Summary
Constructors Modifier Constructor Description Analytics(EventEmitter emitter, android.content.Context context)
protected
Analytics(EventEmitter emitter, android.content.Context context, java.lang.Class<? extends Component> componentClass)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccount()
Returns the global account override.static java.lang.String
getSessionKey()
Gets the globally unique session key for this application session.boolean
getUniqueIdentifierEnabled()
Return whether the client side unique identifier feature is enabled.static java.lang.String
getUserAgentDeviceType()
Return a static version of the result from the getDeviceType method in this classprotected java.util.Map<java.lang.String,java.lang.String>
sendAnalyticsRequest(Event event, java.lang.String analyticsEvent, java.util.Map<java.lang.String,java.lang.String> customParams)
void
setAccount(java.lang.String account)
Sets the global account override.void
setDestination(java.lang.String destination)
The destination must be a valid URI.void
setSource(java.lang.String source)
The source must be a valid URI.void
setUniqueIdentifierEnabled(boolean uniqueIdentifierEnabled)
Set whether the client side unique identifier feature is enabled.-
Methods inherited from class com.brightcove.player.event.AbstractComponent
addListener, addOnceListener, getEventEmitter, removeListener, removeListeners
-
-
-
-
Constructor Detail
-
Analytics
public Analytics(EventEmitter emitter, android.content.Context context)
-
Analytics
protected Analytics(EventEmitter emitter, android.content.Context context, java.lang.Class<? extends Component> componentClass)
-
-
Method Detail
-
getSessionKey
@NonNull public static java.lang.String getSessionKey()
Gets the globally unique session key for this application session.- Returns:
- the unique session key
-
getAccount
public java.lang.String getAccount()
Returns the global account override.
-
setAccount
public void setAccount(java.lang.String account)
Sets the global account override.
-
setDestination
public void setDestination(java.lang.String destination)
The destination must be a valid URI.
-
setSource
public void setSource(java.lang.String source)
The source must be a valid URI.
-
sendAnalyticsRequest
protected java.util.Map<java.lang.String,java.lang.String> sendAnalyticsRequest(Event event, java.lang.String analyticsEvent, java.util.Map<java.lang.String,java.lang.String> customParams)
-
getUserAgentDeviceType
public static java.lang.String getUserAgentDeviceType()
Return a static version of the result from the getDeviceType method in this class- Returns:
- the static version of the device type, to build the SDK User-Agent string
-
getUniqueIdentifierEnabled
public boolean getUniqueIdentifierEnabled()
Return whether the client side unique identifier feature is enabled.
-
setUniqueIdentifierEnabled
public void setUniqueIdentifierEnabled(boolean uniqueIdentifierEnabled)
Set whether the client side unique identifier feature is enabled. By default, unique user tracking is implemented by the Brightcove Analytics server using the client IP address and user agent, but when the client side unique identifier feature is enabled, the device's android ID is used to uniquely identify the user.- See Also:
Settings.Secure.ANDROID_ID
-
-