mozilla/webpay — pull request #280 by muffinresearch (2013-09-10 21:39:33+00:00)
Title: Instrument with GA (bug 903050)

This branch is based on PR #278 so look at the second commit for the changes (this will be rebased as soon as PR #278 is landed)

This adds GA analytics based on fireplace's tracking js with UA parts removed - we can add that back in once it stabilises.

Other parts to note:

* npm install will install the settings_local.js for js overrides
* Overriding js settings can either be done via data attrs or settings_local.js (Again this is how it works for fireplace too)
* Fabfile changes are to ensure the settings_local.js is created in deployments (this will need a review from @oremj)

To test analytics inclusion locally you'll need to add a line to media/js/settings_local.js like so:

```javascript
define('settings_local', [], function() {
return {
// Put your settings overrides here.
tracking_enabled: true
};
});
```

Tracking is just per-page view, events are a separate bug to follow.