Scriptor-Jekyll-Theme icon indicating copy to clipboard operation
Scriptor-Jekyll-Theme copied to clipboard

Google Analytics Update

Open HuRuilizhen opened this issue 1 year ago • 0 comments

Greetings,

Thank for the template, but there is something need to be updated in _includes/google_analytics.html

The code should be:

<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() { dataLayer.push(arguments); }
    gtag('js', new Date());
    gtag('config', '{{ site.google_analytics }}');
    console.log('Google Analytics loaded {{ site.google_analytics }}');
</script>

HuRuilizhen avatar Feb 09 '25 18:02 HuRuilizhen