diff options
Diffstat (limited to '_includes')
-rw-r--r-- | _includes/JB/analytics | 2 | ||||
-rw-r--r-- | _includes/JB/analytics-providers/mixpanel | 11 | ||||
-rw-r--r-- | _includes/JB/comments | 2 | ||||
-rw-r--r-- | _includes/JB/comments-providers/disqus | 1 |
4 files changed, 15 insertions, 1 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 diff --git a/_includes/JB/comments b/_includes/JB/comments index 58fdff6..4e9e600 100644 --- a/_includes/JB/comments +++ b/_includes/JB/comments @@ -1,4 +1,4 @@ -{% if site.JB.comments.provider and page.JB.comments != false %} +{% if site.JB.comments.provider and page.comments != false %} {% case site.JB.comments.provider %} {% when "disqus" %} diff --git a/_includes/JB/comments-providers/disqus b/_includes/JB/comments-providers/disqus index f6dd3a9..618a7b7 100644 --- a/_includes/JB/comments-providers/disqus +++ b/_includes/JB/comments-providers/disqus @@ -2,6 +2,7 @@ <script type="text/javascript"> {% if site.safe == false %}var disqus_developer = 1;{% endif %} var disqus_shortname = '{{ site.JB.comments.disqus.short_name }}'; // required: replace example with your forum shortname + {% if page.wordpress_id %}var disqus_identifier = '{{page.wordpress_id}} {{site.production_url}}/?p={{page.wordpress_id}}';{% endif %} /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; |