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!
You can check that the tracking code is active on your website by accessing your Google Analytics dashboard or using a free Chrome extension. You can also view the source code of your site to check that the tracking code is present.
Processing latency is 24-48 hours. Standard accounts that send more than 200,000 sessions per day to Analytics will result in the reports being refreshed only once a day. This can delay updates to reports and metrics for up to two days.
If the goal page is not tagged with tracking code, Analytics does not track this page, and as a result does not track goals. You should also make sure that you've installed the correct tracking code on your pages since the code is specific to each account property.
This is an old question, but right now getLogger() method is deprecated. Another way to check if analytics is working could be achieved using adb command.
To enable debug logging on a device run:
adb shell setprop log.tag.GAv4 DEBUG
adb logcat -s GAv4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With