Crowdtilt/Crowdhoster — pull request #115 by liuhenry (2013-10-02 00:37:36+00:00)
Title: Analytics v1 for non-multitenant

This is all @mattlebel's work, done for https://github.com/Crowdtilt/Crowdhoster/pull/105 for the [multitenant] (https://github.com/Crowdtilt/Crowdhoster/tree/multitenant) release, but pulled in here.

@mattlebel:
> Adds two things:

> Global Google Analytics tracking
> Custom Google Analytics events for viewing campaign page, click events (main CTA button, secondary CTA button, and rewards), conversion events (continue to checkout button), and completed purchase.

I've added two minor updates:

* GA tracking is available on all sites, not just ones with custom tracking IDs enabled
* ga_debug.js used in development to log tracking debug into console
* All tracking is custom disabled in development through Google's opt-out flag. Most GA properties do not track domains outside of the one set, but it's good to have the flags JIC.