I’m messing around “Google Analytics” for tracking user behavior. I’m able to track pageViews and click of the button.
I’m facing problem in sending the string from the edittext on onClick() method to analytic server.
I have tried using :
tracker.trackEvent(arg0, arg1, arg2, arg3);
But no success. Please guide me where am I doing wrong.
Here is the code in which I’m taking string from the edittext and on OnClick(), I want to send it to the server:
tracker.trackEvent("Application Android",
"viewPageFromCategory", txt, 0);
tracker.dispatch();
Here txt is the string from edittext.
You’re passing
0for the event “value”. I think that means the event occurred 0 times, and so there is nothing to track.See https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#Values:
If you enable verbose debugging of the GA library, you can see in a bit more detail what (if anything) is being pushed up to Google: