Search in sources :

Example 11 with GoogleAnalytics

use of com.google.android.gms.analytics.GoogleAnalytics in project instructure-android by instructure.

the class App method getDefaultTracker.

// region Analytics Event Handling
public synchronized Tracker getDefaultTracker() {
    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);
    }
    return mTracker;
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics)

Example 12 with GoogleAnalytics

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;
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics)

Example 13 with GoogleAnalytics

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);
    }
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics)

Example 14 with GoogleAnalytics

use of com.google.android.gms.analytics.GoogleAnalytics in project Sprog-App by PaulKlinger.

the class SprogApplication method getDefaultTracker.

public synchronized Tracker getDefaultTracker() {
    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.app_tracker);
    }
    return mTracker;
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics)

Example 15 with GoogleAnalytics

use of com.google.android.gms.analytics.GoogleAnalytics in project Telecine by JakeWharton.

the class TelecineModule method provideAnalytics.

@Provides
@Singleton
static Analytics provideAnalytics(Application app) {
    if (BuildConfig.DEBUG) {
        return new Analytics() {

            @Override
            public void send(Map<String, String> params) {
                Timber.tag("Analytics").d(String.valueOf(params));
            }
        };
    }
    GoogleAnalytics googleAnalytics = GoogleAnalytics.getInstance(app);
    Tracker tracker = googleAnalytics.newTracker(BuildConfig.ANALYTICS_KEY);
    // ms? s? better be s.
    tracker.setSessionTimeout(300);
    return new Analytics.GoogleAnalytics(tracker);
}
Also used : GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics) Tracker(com.google.android.gms.analytics.Tracker) Map(java.util.Map) GoogleAnalytics(com.google.android.gms.analytics.GoogleAnalytics) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Aggregations

GoogleAnalytics (com.google.android.gms.analytics.GoogleAnalytics)17 Tracker (com.google.android.gms.analytics.Tracker)4 Provides (dagger.Provides)2 Map (java.util.Map)2 Singleton (javax.inject.Singleton)2 SharedPreferences (android.content.SharedPreferences)1 SystemUser (com.voipgrid.vialer.api.models.SystemUser)1 JsonStorage (com.voipgrid.vialer.util.JsonStorage)1