update google_analytics tag
This commit is contained in:
@@ -18,12 +18,20 @@
|
|||||||
</small>
|
</small>
|
||||||
</footer>
|
</footer>
|
||||||
<script src="/assets/js/main.js" defer="defer"></script>
|
<script src="/assets/js/main.js" defer="defer"></script>
|
||||||
|
{%- if site.google_analytics -%}
|
||||||
{%- if page.google_analytics -%}
|
<!-- Google tag (gtag.js) -->
|
||||||
<script src="/assets/js/galite.js"></script>
|
<script
|
||||||
|
async
|
||||||
|
src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"
|
||||||
|
></script>
|
||||||
<script>
|
<script>
|
||||||
var galite = galite || {};
|
window.dataLayer = window.dataLayer || [];
|
||||||
galite.UA = "{{ site.google_analytics }}";
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
gtag("js", new Date());
|
||||||
|
|
||||||
|
gtag("config", "{{ site.google_analytics }}");
|
||||||
</script>
|
</script>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if page.url == '/posts/' -%}
|
{%- if page.url == '/posts/' -%}
|
||||||
|
|||||||
Reference in New Issue
Block a user