From 4015fa5e2849674848eaff3a8b478fc0e5d8f23d Mon Sep 17 00:00:00 2001 From: James Ousby Date: Mon, 18 Mar 2013 21:29:40 +1100 Subject: [PATCH 1/3] support for google universal beta tracking --- _config.yml | 7 +++++-- _includes/JB/analytics | 6 ++++-- .../JB/analytics-providers/{google => google-classic} | 0 _includes/JB/analytics-providers/google-universal | 10 ++++++++++ 4 files changed, 19 insertions(+), 4 deletions(-) rename _includes/JB/analytics-providers/{google => google-classic} (100%) create mode 100755 _includes/JB/analytics-providers/google-universal diff --git a/_config.yml b/_config.yml index 187d74e2a5..b51c72bb6f 100644 --- a/_config.yml +++ b/_config.yml @@ -99,9 +99,12 @@ JB : # Set 'provider' to false to turn analytics off globally. # analytics : - provider : google - google : + provider : google-classic + google-classic : tracking_id : 'UA-123-12' + google-universal : + tracking_id : 'UA-123-12' + domain: 'github.com' getclicky : site_id : mixpanel : diff --git a/_includes/JB/analytics b/_includes/JB/analytics index 4b04ec9d90..d2e4b2e7f2 100644 --- a/_includes/JB/analytics +++ b/_includes/JB/analytics @@ -1,8 +1,10 @@ {% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %} {% case site.JB.analytics.provider %} -{% when "google" %} - {% include JB/analytics-providers/google %} +{% when "google-classic" %} + {% include JB/analytics-providers/google-classic %} +{% when "google-universal" %} + {% include JB/analytics-providers/google-universal %} {% when "getclicky" %} {% include JB/analytics-providers/getclicky %} {% when "mixpanel" %} diff --git a/_includes/JB/analytics-providers/google b/_includes/JB/analytics-providers/google-classic similarity index 100% rename from _includes/JB/analytics-providers/google rename to _includes/JB/analytics-providers/google-classic diff --git a/_includes/JB/analytics-providers/google-universal b/_includes/JB/analytics-providers/google-universal new file mode 100755 index 0000000000..8e612bbdb4 --- /dev/null +++ b/_includes/JB/analytics-providers/google-universal @@ -0,0 +1,10 @@ + \ No newline at end of file From b93ed990204bdd9f5801494aa10d6f59e19420c6 Mon Sep 17 00:00:00 2001 From: James Ousby Date: Mon, 18 Mar 2013 22:10:28 +1100 Subject: [PATCH 2/3] fix template variable references --- _includes/JB/analytics-providers/google-classic | 2 +- _includes/JB/analytics-providers/google-universal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/JB/analytics-providers/google-classic b/_includes/JB/analytics-providers/google-classic index 9014866a40..8059babfef 100644 --- a/_includes/JB/analytics-providers/google-classic +++ b/_includes/JB/analytics-providers/google-classic @@ -1,6 +1,6 @@ \ No newline at end of file From a19233762a317ef890664df6c688c8676d816a46 Mon Sep 17 00:00:00 2001 From: James Ousby Date: Mon, 18 Mar 2013 22:21:13 +1100 Subject: [PATCH 3/3] used underscore to be consistent with current multi word var names --- _config.yml | 6 +++--- _includes/JB/analytics | 4 ++-- _includes/JB/analytics-providers/google-classic | 2 +- _includes/JB/analytics-providers/google-universal | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_config.yml b/_config.yml index b51c72bb6f..71779f6ce3 100644 --- a/_config.yml +++ b/_config.yml @@ -99,10 +99,10 @@ JB : # Set 'provider' to false to turn analytics off globally. # analytics : - provider : google-classic - google-classic : + provider : google_classic + google_classic : tracking_id : 'UA-123-12' - google-universal : + google_universal : tracking_id : 'UA-123-12' domain: 'github.com' getclicky : diff --git a/_includes/JB/analytics b/_includes/JB/analytics index d2e4b2e7f2..94e7ca47d2 100644 --- a/_includes/JB/analytics +++ b/_includes/JB/analytics @@ -1,9 +1,9 @@ {% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %} {% case site.JB.analytics.provider %} -{% when "google-classic" %} +{% when "google_classic" %} {% include JB/analytics-providers/google-classic %} -{% when "google-universal" %} +{% when "google_universal" %} {% include JB/analytics-providers/google-universal %} {% when "getclicky" %} {% include JB/analytics-providers/getclicky %} diff --git a/_includes/JB/analytics-providers/google-classic b/_includes/JB/analytics-providers/google-classic index 8059babfef..af099078a5 100644 --- a/_includes/JB/analytics-providers/google-classic +++ b/_includes/JB/analytics-providers/google-classic @@ -1,6 +1,6 @@ \ No newline at end of file