Google analytics: track activities your users do

Google Analytics offer not only tracking you users geographic location, pages they open and their devices specifications, but also thorough information your users do on your site, in your mobile app.

If you have website and you want to know what links your users click, then probably you’d like to know about the following feature:

add to your links OnClick event and you will get proper information in real time about links your users clicked.


You also can set other types of events to track.

If you want to know what your users search through your server, then you will find useful following code:

     _gaq.push(['_trackEvent', 'Search', $(this).val(), 'search']);

Web analytics documentation can be found here Event Tracking – Web Tracking (ga.js)

If you have Android app and you want to know what your users do in it, then feel free in any place in your Activity place the following code:

public void onClick(View v) {
  // May return null if a EasyTracker has not yet been initialized with a
  // property ID.
  EasyTracker easyTracker = EasyTracker.getInstance(this);

  // MapBuilder.createEvent().build() returns a Map of event fields and values
  // that are set and sent with the hit.
      .createEvent("ui_action",     // Event category (required)
                   "button_press",  // Event action (required)
                   "play_button",   // Event label
                   null)            // Event value

Android analytics documentation is here Event Tracking – Android SDK

iOS developers can check the document Event Tracking – iOS SDK

Leave a Reply

%d bloggers like this: