Tracking and analytics¶
Description
How to set up tracking and analytics for a mobile site
Introduction¶
Mobile browser limitations prevent using Javascript based tracking on mobile pages, which is the most dominant tracking form on the web.
Also, the collected tracking data for mobile differs. The site owner is more interest what kind of browsers and handsets visit on the site.
Go Mobile supports pluggable tracking backends. You can choose one of tracking backends supported out of the box, or write your own.
Supported tracking services¶
- Plone default (the same Javascript used as used on normal web pages)
- Google Analytics Mobile
- Google Analytics Web
- AdMob
- Bango
How to set-up a tracker¶
Warning
In pre-1.0 versions, Go Mobile supports only Javascript based Google Analytics.
Using the default Javascript tracking code¶
The easiest way to set up tracking is to use the same Javascript code which is being used on the Plone web site.
The downside is that mobile browsers not supporting Javascript are not being tracked.
Note
This is the default tracking method for Web and Mobile
- Go to Web and Mobile Settings
- As a
tracker_name
, enterplone-default
- As a
tracking_id
, enter the tracking id given by Google
Different Javascript for web and mobile sites¶
This is the most pain-free tracking method for mobile clients supported Javascript (not suitable for low end phones).
- Visit Google Analytics site and create a new site
- When Google Analytics offers you a tracking code, choose Advanced -> Mobile
- Extract tracking id which is in format "UA-8819100-123"
- Now, go to Web and Mobile Settings
- As a tracker_name, enter google-web
- As a tracking_id, enter the tracking id given by Google
Image based tracking¶
- Visit Google Analytics site and create a new site
- When Google Analytics offers you a tracking code, choose Advanced -> Mobile
- Extract tracking id which is in format "MO-1234-12"
- Now, go to Web and Mobile Settings
- As a tracker_name, enter google-mobile
- As a tracking_id, enter the tracking id given by Google
Note
Google Analytics may complain that the tracker verification failed. This is normal.
Google Analytics mobile background¶
Tracking is done using 1x1 pixel GIF image called __utm.gif. The image is a white pixel appearing in the footer. CSS style is used to fade away the image to invisible by setting opacity to 1%. However, this only works on browsers support opacity CSS rule.
When the image URL is formed, HTTP request headers are read and forwarded to Google Analytics as HTTP GET query parameters. This way refering page etc. are propeply tracked.
Real IP address of the client¶
If you are using Apache's mod_proxy or similar virtual hosting solution, make sure that the real IP address of the client reaches the tracking code.
You need to make sure that your front-end server passes the IP information forward. For Apache, this setting is:
ProxyVia on
For more information see