summaryrefslogtreecommitdiff
path: root/_includes
diff options
context:
space:
mode:
authorJade <plusjade@gmail.com>2012-03-01 01:24:00 -0800
committerJade <plusjade@gmail.com>2012-03-01 01:24:00 -0800
commitb804d16d5b13da24ff1f896565ff9c466da77c2e (patch)
tree750a3f3b6f483ba43b6cf772e2e09e51e17b02fd /_includes
parentca37b93198908805edf8efbe2d3e8045933f46f4 (diff)
parentf9b9cff1da9d254b19b6625db0bc04fe928c4fdb (diff)
Merge pull request #49 from koomar/jb-development
Mixpanel as Analytics Provider for JB
Diffstat (limited to '_includes')
-rw-r--r--_includes/JB/analytics2
-rw-r--r--_includes/JB/analytics-providers/mixpanel11
2 files changed, 13 insertions, 0 deletions
diff --git a/_includes/JB/analytics b/_includes/JB/analytics
index 9280e8d..4b04ec9 100644
--- a/_includes/JB/analytics
+++ b/_includes/JB/analytics
@@ -5,6 +5,8 @@
{% include JB/analytics-providers/google %}
{% when "getclicky" %}
{% include JB/analytics-providers/getclicky %}
+{% when "mixpanel" %}
+ {% include JB/analytics-providers/mixpanel %}
{% when "custom" %}
{% include custom/analytics %}
{% endcase %}
diff --git a/_includes/JB/analytics-providers/mixpanel b/_includes/JB/analytics-providers/mixpanel
new file mode 100644
index 0000000..4406eb0
--- /dev/null
+++ b/_includes/JB/analytics-providers/mixpanel
@@ -0,0 +1,11 @@
+<script type="text/javascript">
+ var mpq = [];
+ mpq.push(["init", "{{ site.JB.analytics.mixpanel.token}}"]);
+ (function(){var b,a,e,d,c;b=document.createElement("script");b.type="text/javascript";
+ b.async=true;b.src=(document.location.protocol==="https:"?"https:":"http:")+
+ "//api.mixpanel.com/site_media/js/api/mixpanel.js";a=document.getElementsByTagName("script")[0];
+ a.parentNode.insertBefore(b,a);e=function(f){return function(){mpq.push(
+ [f].concat(Array.prototype.slice.call(arguments,0)))}};d=["init","track","track_links",
+ "track_forms","register","register_once","identify","name_tag","set_config"];for(c=0;c<
+ d.length;c++){mpq[d[c]]=e(d[c])}})();
+</script> \ No newline at end of file