Skip to content

Commit

Permalink
Add analytics code to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eliangcs committed Dec 23, 2016
1 parent 6903d10 commit 6be52af
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/_templates/analytics.html
@@ -0,0 +1,4 @@
<script type="text/javascript">
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=t.forceSSL||"https:"===document.location.protocol,a=document.createElement("script");a.type="text/javascript",a.async=!0,a.src=(r?"https:":"http:")+"//cdn.heapanalytics.com/js/heap-"+e+".js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n);for(var o=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","removeEventProperty","setEventProperties","track","unsetEventProperty"],c=0;c<p.length;c++)heap[p[c]]=o(p[c])};
heap.load("2016114893");
</script>
8 changes: 8 additions & 0 deletions docs/_templates/layout.html
@@ -0,0 +1,8 @@
{%- extends "!layout.html" %}

{% block extrahead %}
{{ super() }}
{% if READTHEDOCS %}
{% include "analytics.html" %}
{% endif %}
{% endblock %}

0 comments on commit 6be52af

Please sign in to comment.