I have an Android application in which I want to track views. I am not sure if these are considered page views but I don't think they are.
Could someone tell me how to load a tracker so that the events sent would be sent to that specific view?
I have set up the tracking id and other event information.
tracker = analytics.newTracker(UA_TRACKER_ID);
tracker.setScreenName(screen);
if (tracker != null) {
tracker.enableExceptionReporting(true);
tracker.enableAdvertisingIdCollection(true);
tracker.enableAutoActivityTracking(true);
tracker.setScreenName("screen name");
tracker.setAppName("app name");
tracker.send(new HitBuilders.EventBuilder()
.set("&cs", "campaign source")
.set("&ck", "campaign stuff")
.setCategory(category)
.setAction(action)
.setLabel(label)
.build());
}
Copyright Notice:Content Author:「Hades」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30770374/track-view-google-analytics