portails/layouts/partials/head/script-header.html

11 lines
453 B
HTML
Raw Normal View History

2020-04-15 15:48:16 +02:00
{{ if isset .Site.Params "googleanalytics" -}}
<script>
(function(e,t,n,i,s,a,c){e[n]=e[n]||function(){(e[n].q=e[n].q||[]).push(arguments)}
;a=t.createElement(i);c=t.getElementsByTagName(i)[0];a.async=true;a.src=s
;c.parentNode.insertBefore(a,c)
})(window,document,"galite","script","{{ .Site.BaseURL }}js/vendor/ga-lite/ga-lite.min.js");
galite('create', '{{ $.Site.Params.googleAnalytics }}', 'auto');
galite('send', 'pageview');
</script>
{{ end -}}