You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.1 KiB
28 lines
1.1 KiB
9 months ago
|
if theme.baidu_analytics
|
||
|
script.
|
||
|
var _hmt = _hmt || [];
|
||
|
(function() {
|
||
|
var hm = document.createElement("script");
|
||
|
hm.src = "https://hm.baidu.com/hm.js?!{theme.baidu_analytics}";
|
||
|
var s = document.getElementsByTagName("script")[0];
|
||
|
s.parentNode.insertBefore(hm, s);
|
||
|
})();
|
||
|
|
||
|
if theme.google_analytics
|
||
|
script(async src=`https://www.googletagmanager.com/gtag/js?id=${theme.google_analytics}`)
|
||
|
script.
|
||
|
window.dataLayer = window.dataLayer || [];
|
||
|
function gtag(){dataLayer.push(arguments);}
|
||
|
gtag('js', new Date());
|
||
|
gtag('config', '!{theme.google_analytics}');
|
||
|
|
||
|
if theme.cloudflare_analytics
|
||
|
script(defer data-pjax src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon=`{"token": "${theme.cloudflare_analytics}"}`)
|
||
|
|
||
|
if theme.microsoft_clarity
|
||
|
script.
|
||
|
(function(c,l,a,r,i,t,y){
|
||
|
c[a]=c[a]||function(){(c[a].q=c[a].q||[]).push(arguments)};
|
||
|
t=l.createElement(r);t.async=1;t.src="https://www.clarity.ms/tag/"+i;
|
||
|
y=l.getElementsByTagName(r)[0];y.parentNode.insertBefore(t,y);
|
||
|
})(window, document, "clarity", "script", "!{theme.microsoft_clarity}");
|