Skip to content

Commit

Permalink
add google_analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang authored and peng1999 committed Aug 12, 2019
1 parent 7feed07 commit 0687e82
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@
onload="renderMathInElement(document.body);"></script>
{% endif %}
{% endif %}
{% if config.extra.even_google_analytics is defined %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ config.extra.even_google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', '{{ config.extra.even_google_analytics }}');
</script>
{% endif %}
{% endblock js %}

{% block css %}
Expand Down

0 comments on commit 0687e82

Please sign in to comment.