-
public final class PianoAnalyticsSingleton class used as a facade to the Piano Analytics
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfacePianoAnalytics.EventProcessorCallbackpublic classPianoAnalytics.Companion
-
Field Summary
Fields Modifier and Type Field Description private final StringvisitorIdprivate StringcustomVisitorIdprivate final List<EventProcessor>customEventProcessorsprivate PianoAnalytics.EventProcessorCallbackeventProcessorCallbackprivate final PrivacyModesStorageprivacyModesStorageprivate final ContextPropertiesStoragecontextPropertiesStorageprivate final UserStorageuserStorage
-
Method Summary
Modifier and Type Method Description final StringgetVisitorId()Current visitor id, depends on Configuration.visitorIDType final StringgetCustomVisitorId()Custom visitor id, will be used if Configuration.visitorIDType is set to VisitorIDType. final UnitsetCustomVisitorId(String customVisitorId)Custom visitor id, will be used if Configuration.visitorIDType is set to VisitorIDType. final List<EventProcessor>getCustomEventProcessors()List of custom event processors, which can change sending events. final PianoAnalytics.EventProcessorCallbackgetEventProcessorCallback()Callback, which will be called after all events' processors and before sending event. final UnitsetEventProcessorCallback(PianoAnalytics.EventProcessorCallback eventProcessorCallback)Callback, which will be called after all events' processors and before sending event. final PrivacyModesStoragegetPrivacyModesStorage()final ContextPropertiesStoragegetContextPropertiesStorage()final UserStoragegetUserStorage()final UnitscreenName(String name)Sets current screen name. final MediaHelpermediaHelper(String contentId, String mediaSessionId)Returns a MediaHelper for sending AV Insights event final MediaHelpermediaHelper(String contentId)Returns a MediaHelper for sending AV Insights event final UnitsendEvents(Event events)Send events data final UnitsendOfflineData()Send offline data stored on device final UnitdeleteOfflineStorage(Integer remaining)Delete offline data stored on device and keep only remaining days -
-
Method Detail
-
getVisitorId
final String getVisitorId()
Current visitor id, depends on Configuration.visitorIDType
-
getCustomVisitorId
final String getCustomVisitorId()
Custom visitor id, will be used if Configuration.visitorIDType is set to VisitorIDType.CUSTOM
-
setCustomVisitorId
final Unit setCustomVisitorId(String customVisitorId)
Custom visitor id, will be used if Configuration.visitorIDType is set to VisitorIDType.CUSTOM
-
getCustomEventProcessors
final List<EventProcessor> getCustomEventProcessors()
List of custom event processors, which can change sending events. Privacy rules will be applied after these event processors
-
getEventProcessorCallback
final PianoAnalytics.EventProcessorCallback getEventProcessorCallback()
Callback, which will be called after all events' processors and before sending event.
-
setEventProcessorCallback
final Unit setEventProcessorCallback(PianoAnalytics.EventProcessorCallback eventProcessorCallback)
Callback, which will be called after all events' processors and before sending event.
-
getPrivacyModesStorage
final PrivacyModesStorage getPrivacyModesStorage()
-
getContextPropertiesStorage
final ContextPropertiesStorage getContextPropertiesStorage()
-
getUserStorage
final UserStorage getUserStorage()
-
screenName
final Unit screenName(String name)
Sets current screen name. It will be automatically added as property for event Event.PAGE_DISPLAY
- Parameters:
name- screen name
-
mediaHelper
@JvmOverloads() final MediaHelper mediaHelper(String contentId, String mediaSessionId)
Returns a MediaHelper for sending AV Insights event
- Parameters:
contentId- Content id for AV Insights events.mediaSessionId- Session id for AV Insights events.
-
mediaHelper
@JvmOverloads() final MediaHelper mediaHelper(String contentId)
Returns a MediaHelper for sending AV Insights event
- Parameters:
contentId- Content id for AV Insights events.
-
sendEvents
final Unit sendEvents(Event events)
Send events data
- Parameters:
events- a custom event list
-
sendOfflineData
final Unit sendOfflineData()
Send offline data stored on device
-
deleteOfflineStorage
final Unit deleteOfflineStorage(Integer remaining)
Delete offline data stored on device and keep only remaining days
- Parameters:
remaining- age of data which have to be kept (in days)
-
-
-
-