Google Analytics

This extension send an event to GA (Google Analytics) each time iUI slides to a new screen. It then solves the problem of having one analytics event sent on page load with no ajax navigation event tracked.

Google Analytics
Author: Sean Gilligan
Version: 1.0
See also
- Getting Started
- Frequently Asked Questions
- iUI code documentation
- Advanced styling & themes
Get Involved
Like in most open-source projects, the more we are, the meyer it is! HTML/CSS/JS, documentation, design, translation, ...
Don't be shy
1. Installation

Just install GA following Google guideline and make sure it works properly.

2. Instructions for use

You don't have to do anything more, this extension do the job for you.
Using iUI custom event 'focus', a "_trackEvent" is sent to GA each time iUI slides to a new screen with the following parameters:
- category: '_trackEvent'
- action: 'iUI'
- opt_label: 'focus'
- opt_value: current page name + '#' + page id attribute value
(example: 'index.html#homepage', 'index.html#contact')

We could also use a some pageTrack but the benefit of this model is that you can add your own events if needed.
Imagine you have a 'read more' button, you can add the following code to a normal <a> click: _gaq.push(['_trackEvent', 'iUI', 'readmore', e.target.tagName + "#" + e.target.id]);