public static class AnalyticsModule.Builder extends Object
| Constructor and Description |
|---|
AnalyticsModule.Builder(String userAccount) |
| Modifier and Type | Method and Description |
|---|---|
AnalyticsModule.Builder |
autoCreate(boolean autoCreate)
Set this to false if you want to create the universal analytics tracker with custom
options.
|
AnalyticsModule.Builder |
autoInject(boolean autoInject)
Set this to false if you want to manually put the analytics.js script in your head section.
|
AnalyticsModule |
build() |
AnalyticsModule.Builder |
setFallbackPath(String fallbackPath)
Analytics needs to load the script from www.google-analytics.com/analytics.js.
|
AnalyticsModule.Builder |
trackInitialPageView(boolean trackInitialPageView)
By default the initial page view will be tracked.
|
AnalyticsModule.Builder |
trackUncaughtExceptions(boolean trackUncaughtExceptions)
Set this to true if you want uncaught exceptions to be tracked.
|
public AnalyticsModule.Builder(String userAccount)
public AnalyticsModule.Builder autoCreate(boolean autoCreate)
analytics.create().go()
analytics.sendPageView().go();
from your bootstrapper or entrypoint.autoCreate - public AnalyticsModule.Builder autoInject(boolean autoInject)
autoInject - public AnalyticsModule.Builder trackInitialPageView(boolean trackInitialPageView)
trackInitialPageView - public AnalyticsModule.Builder setFallbackPath(String fallbackPath)
This call can fail relatively often eg: because the user is in a country that blocks google, or if the user is running an extension that blocks third party scripts.
Set the fallbackPath to automatically proxy the analytics calls via your own server.
For this to work you must set up a proxy on your server using:
AnalyticsProxyModule
fallbackPath - public AnalyticsModule build()
public AnalyticsModule.Builder trackUncaughtExceptions(boolean trackUncaughtExceptions)
trackUncaughtExceptions - Copyright © 2015. All Rights Reserved.