use of com.google.android.gms.analytics.GoogleAnalytics in project routerkeygenAndroid by routerkeygen.
the class RouterKeygenApplication method getTracker.
/**
* Gets the default {@link Tracker} for this {@link Application}.
* @return tracker
*/
public synchronized Tracker getTracker() {
if (mTracker == null) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
// To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
mTracker = analytics.newTracker(R.xml.analytics);
mTracker.enableAdvertisingIdCollection(true);
}
return mTracker;
}
use of com.google.android.gms.analytics.GoogleAnalytics in project saga-android by AnandChowdhary.
the class ApplicationWrapper method getTracker.
synchronized Tracker getTracker(TrackerName trackerId) {
if (!mTrackers.containsKey(trackerId)) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
Tracker t = (trackerId == TrackerName.APP_TRACKER) ? analytics.newTracker(PROPERTY_ID) : (trackerId == TrackerName.GLOBAL_TRACKER) ? analytics.newTracker(R.xml.global_tracker) : analytics.newTracker(R.xml.global_tracker);
mTrackers.put(trackerId, t);
}
return mTrackers.get(trackerId);
}
use of com.google.android.gms.analytics.GoogleAnalytics in project wh-app-android by WhiteHouse.
the class WHApp method configureAnalytics.
private void configureAnalytics() {
if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(this) == SUCCESS) {
GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
mAppTracker = analytics.newTracker(gov.whitehouse.R.xml.google_analytics);
mAppTracker.enableAutoActivityTracking(true);
mAppTracker.setAnonymizeIp(true);
}
}
Aggregations