You tried to look at the logs when using the emulator. May be helpful. Otherwise, you can try below.
I also had some problems installing GATracker. The latest library includes EasyTracker , which saves you from overhead.
- Add a res/values/analytics.xml file containing analytics profile configuration information.
<?xml version="1.0" encoding="utf-8" ?> <resources> <string name="ga_trackingId">UA-XXXX-Y</string> <bool name="ga_autoActivityTracking">true</bool> <bool name="ga_reportUncaughtExceptions">true</bool> </resources>
- Set the context for EasyTracker in their activities using the following
EasyTracker.getInstance().setContext(this);
- Now you can make EasyTracker call
@Override public void onStart() { super.onStart(); ... // The rest of your onStart() code. EasyTracker.getInstance().activityStart(this); // Add this method. } @Override public void onStop() { super.onStop(); ... // The rest of your onStop() code. EasyTracker.getInstance().activityStop(this); // Add this method. }
- Other event calls can be made like,
EasyTracker.getInstance().sendEvent(String category, String action, String label, long value);
Hope this helps. More detailed documentation can be found here.
source share