Merge pull request #166 from nemchik/patch-2

Fix google analytics.
pull/169/head
TRaSH 4 years ago committed by GitHub
commit 7aa2816c24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,9 +1,16 @@
app.location$.subscribe(function (url) {
var gtag_id = "G-ZZKM4MPQXL";
var script = document.createElement("script");
script.src = "https://www.googletagmanager.com/gtag/js?id=" + gtag_id;
document.head.appendChild(script);
location$.subscribe(function (url) {
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-ZZKM4MPQXL");
gtag("js", new Date());
gtag("config", gtag_id);
});

@ -1,10 +1,5 @@
{% extends "base.html" %}
{% block analytics %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-ZZKM4MPQXL"></script>
{% endblock %}
{% block content %}
{{ super() }}
<footer class="sponsorship">

Loading…
Cancel
Save