You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2015/12/18 00:19:51 UTC

incubator-systemml-website git commit: Add analytics

Repository: incubator-systemml-website
Updated Branches:
  refs/heads/master 5181cbeaf -> 5af75c33f


Add analytics


Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/commit/5af75c33
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/tree/5af75c33
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/diff/5af75c33

Branch: refs/heads/master
Commit: 5af75c33f46a4f7f5da8d63e702ca6b4d947bf01
Parents: 5181cbe
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Thu Dec 17 15:19:29 2015 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Thu Dec 17 15:19:29 2015 -0800

----------------------------------------------------------------------
 _config.yml                                       | 5 +++++
 _includes/JB/analytics                            | 4 ++--
 _includes/JB/analytics-providers/google-universal | 7 +++----
 3 files changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/blob/5af75c33/_config.yml
----------------------------------------------------------------------
diff --git a/_config.yml b/_config.yml
index 1c5e5bc..9bc051f 100644
--- a/_config.yml
+++ b/_config.yml
@@ -19,3 +19,8 @@ github_username:  jekyll
 
 # Build settings
 markdown: kramdown
+
+# if 'analytics_on' is true, analytics section will be rendered on the HTML pages
+analytics_on: true
+analytics_provider: google_universal
+analytics_google_universal_tracking_id : UA-71553733-1

http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/blob/5af75c33/_includes/JB/analytics
----------------------------------------------------------------------
diff --git a/_includes/JB/analytics b/_includes/JB/analytics
index 48d87c2..cbada67 100644
--- a/_includes/JB/analytics
+++ b/_includes/JB/analytics
@@ -1,6 +1,6 @@
-{% if site.safe and site.JB.analytics.provider and page.JB.analytics != false %}
+{% if site.analytics_on == true %}
 
-{% case site.JB.analytics.provider %}
+{% case site.analytics_provider %}
 {% when "google_classic" %}
   {% include JB/analytics-providers/google-classic %}
 {% when "google_universal" %}

http://git-wip-us.apache.org/repos/asf/incubator-systemml-website/blob/5af75c33/_includes/JB/analytics-providers/google-universal
----------------------------------------------------------------------
diff --git a/_includes/JB/analytics-providers/google-universal b/_includes/JB/analytics-providers/google-universal
index dae744b..67ae1ee 100644
--- a/_includes/JB/analytics-providers/google-universal
+++ b/_includes/JB/analytics-providers/google-universal
@@ -1,11 +1,10 @@
-<script type="text/javascript">
+<script>
   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
   m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 
-  ga('create', '{{ site.JB.analytics.google_universal.tracking_id }}', '{{ site.JB.analytics.google_universal.domain }}');
-  ga('require', 'linkid', 'linkid.js');
+  ga('create', '{{ site.analytics_google_universal_tracking_id }}', 'auto');
   ga('send', 'pageview');
 
-</script>
\ No newline at end of file
+</script>