feat: add blocks to gtag snippet
This commit is contained in:
parent
ef084a2a60
commit
913908fc61
|
@ -1,16 +1,26 @@
|
|||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{googleanalytics_id}}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
{% block main %}
|
||||
<!-- Google tag (gtag.js) -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{googleanalytics_id}}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
|
||||
gtag('set', 'linker', );
|
||||
gtag('js', new Date());
|
||||
{% block setup %}
|
||||
gtag('set', 'linker');
|
||||
|
||||
gtag('config', '{{googleanalytics_id}}', {
|
||||
anonymize_ip: true,
|
||||
linker: {
|
||||
domains: {{ googleanalytics_linked_domains|tojson }}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', '{{googleanalytics_id}}', {
|
||||
anonymize_ip: true,
|
||||
linker: {
|
||||
domains: {{ googleanalytics_linked_domains|tojson }}
|
||||
}
|
||||
});
|
||||
{% endblock setup %}
|
||||
|
||||
{% block extra %}
|
||||
{% endblock extra %}
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue