Track view Google Analytics
NickName:Hades Ask DateTime:2015-06-11T10:05:31

Track view Google Analytics

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

More about “Track view Google Analytics” related questions

Track view Google Analytics

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 ...

Show Detail

How to track site search in Google Analytics and not count as a page view?

I'm using Google Analytics (analytics.js) to track site searches on my website: ga('send', 'pageview', '?q=' + search_term); As you can see I'm using pageview as the hit type. My problem is, I

Show Detail

Use Google Analytics to track bugs?

Is it possible to use Google Analytics to keep track of when users receive 404, 401, and other types of errors as well as associate additional data with those reports, such as stack traces? I've

Show Detail

Google analytics page view track

Hi there I am doing research on google anlytics. I have got the following code from google analytics var _gaq = _gaq || []; _gaq.push(['_setAccount', 'XXXXX']); _gaq.push(['_trackPageview']); (fu...

Show Detail

Google analytics - Track events in iframe but not the pageview

I am trying to track events in iframe through google analytics its not cross domain but I need to call the content in an iframe and track events. I used this object to send an event to google analy...

Show Detail

Using Google Analytics to Track User Session

I have a PHP (5+) based website. I want to track registered users of my site using Google Analytics. I basically just wish to grab their session id (or some way to identify each specific user)and ...

Show Detail

Track Admob Event in the Google Analytics

Is it possible to track Admob event that the user clicked on the ads in the Google Analytics . I use AdMob for showing ads. I want to track every click on ads in Google Analytics. How can I set up...

Show Detail

Track alert window on Google Analytics

How can I track floating view on android using Google Analytics. I am talking about view adds to window using WindowManager and Needed SYSTEM_ALERT_WINDOW permission. Activity can tracked by EasyT...

Show Detail

Track the page view in one single html using google analytics

I am doing website in html5. Here I used all pages in "one html" and page view controlling by jQuery. In my html each page has a separate "ID". I need to track individual page using google analytic...

Show Detail

Track Page Views with Google Analytics

I need to track page views of a site with Google Analytics. As far as I know I need to send the URL of the page to GA. But sometimes the URL might change in the future even if it is the same page.

Show Detail