I'm trying to get info about specific button clicks inside my app. What I've done so far (using one of the guides I've found on the web) is :
Tracker tracker = GoogleAnalytics.getInstance(this).getTracker(ID);
HashMap<String, String> hitParameters = new HashMap<String, String>();
hitParameters.put(Fields.EVENT_CATEGORY, "UI Action");
hitParameters.put(Fields.EVENT_ACTION, "Button Pressed");
hitParameters.put(Fields.EVENT_LABEL, "play");
tracker.send(hitParameters);
I'm not getting any reaction to this code at the google analytic website. Is there something wrong with the code?
Notice: * The real time analytics and overview is working great in general, except those events.
I\ve done this the following way (using easytracker & v3 version of analytics):
EasyTracker easyTracker = EasyTracker.getInstance(this);
easyTracker.send(MapBuilder
.createEvent(
"UI Action", // Event category (required)
"Button Pressed", // Event action (required)
"play", // Event label
null) // Event value
.build()
);
Also see here
Other than that, please note that events can take a while to show up on the analytics page in my experience.
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