Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #49 from koomar/jb-development

Mixpanel as Analytics Provider for JB
  • Loading branch information...
commit b804d16d5b13da24ff1f896565ff9c466da77c2e 2 parents ca37b93 + f9b9cff
@plusjade plusjade authored
View
4 _config.yml
@@ -97,11 +97,13 @@ JB :
# Set 'provider' to false to turn analytics off globally.
#
analytics :
- provider : google
+ provider : google
google :
tracking_id : 'UA-123-12'
getclicky :
site_id :
+ mixpanel :
+ token : '_MIXPANEL_TOKEN_'
# Settings for sharing helper.
# Sharing is for things like tweet, plusone, like, reddit buttons etc.
View
2  _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 %}
View
11 _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>
Please sign in to comment.
Something went wrong with that request. Please try again.