Merge pull request #49 from koomar/jb-development
Mixpanel as Analytics Provider for JB
This commit is contained in:
commit
b804d16d5b
3 changed files with 16 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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 %}
|
||||
|
|
11
_includes/JB/analytics-providers/mixpanel
Normal file
11
_includes/JB/analytics-providers/mixpanel
Normal file
|
@ -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>
|
Loading…
Add table
Reference in a new issue