class GoogleAnalytics extends ServiceImpl implements EventTrackingService
| Modifier and Type | Class and Description |
|---|---|
(package private) static interface |
GoogleAnalytics.GoogleAnalyticsService
Retrofit Service
|
(package private) static class |
GoogleAnalytics.StringConverter
Custom Retrofit Converter that parses data as simple Strings.
|
| Modifier and Type | Field and Description |
|---|---|
(package private) GoogleAnalytics.GoogleAnalyticsService |
googleAnalyticsService |
(package private) java.lang.String |
trackingId |
context, utils| Constructor and Description |
|---|
GoogleAnalytics(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
(package private) java.lang.String |
createPayloadData(java.lang.String event)
See: https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide
|
(package private) GoogleAnalytics.GoogleAnalyticsService |
createService()
Lazy load instance of
GoogleAnalytics.GoogleAnalyticsService |
void |
enable(java.lang.String trackingId)
Enable this service.
|
ServiceType |
getServiceType()
Returns on of
ServiceType that corresponds to this service. |
boolean |
isEnabled()
This service is enabled
|
void |
logEvent(android.content.Context context,
java.lang.String event)
Send the given event to the backing service.
|
java.lang.String trackingId
GoogleAnalytics.GoogleAnalyticsService googleAnalyticsService
public void enable(java.lang.String trackingId)
public boolean isEnabled()
public ServiceType getServiceType()
ServiceType that corresponds to this service.getServiceType in interface ServiceServiceType.public void logEvent(android.content.Context context,
java.lang.String event)
logEvent in interface EventTrackingServicecontext - Context.event - Event to track. This will be sent to the service represented by this class.GoogleAnalytics.GoogleAnalyticsService createService()
GoogleAnalytics.GoogleAnalyticsServiceGoogleAnalytics.GoogleAnalyticsService. Never null.java.lang.String createPayloadData(java.lang.String event)
event - Event to tack