androidgoogle-analytics-sdk

Check if Google Analytics Tracking is working


I integrated the Google Analytics Tracker.

I used the following code to send a track for the welcome screen:

   Tracker tracker = ((AnalyticsSampleApp) this.getApplication()).getTracker(
            AnalyticsSampleApp.TrackerName.APP_TRACKER);

    // Enable Advertising Features.
    tracker.enableAdvertisingIdCollection(true);

    // Set screen name.
    tracker.setScreenName("Welcome Page.");

    // Send a screen view.
    tracker.send(new HitBuilders.AppViewBuilder().build());

How can I know if tracking is working.

Note: I don't have an access to the google analytics account.

Should it send messages to log cat? can see any related messages!


Solution

  • It can print a bunch of stuff to logcat, you need to configure the log level, e.g.

    GoogleAnalytics.getInstance(this).getLogger().setLogLevel(LogLevel.VERBOSE);
    

    For true end-to-end testing create your own Google Analytics account and hard-code your own property ID. The real-time dashboards will show you your test activity.