Fix Google Analytics Tags
This commit is contained in:
parent
417eb257d0
commit
3a3ac4e175
|
@ -69,13 +69,13 @@ if (!!window.ActiveXObject || "ActiveXObject" in window) { //is IE?
|
||||||
alert('朋友,IE浏览器未适配哦~');
|
alert('朋友,IE浏览器未适配哦~');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
|
||||||
<?php if(akina_option('google_analytics_id', '')):?>
|
<?php if(akina_option('google_analytics_id', '')):?>
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo akina_option('google_analytics_id', ''); ?>"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo akina_option('google_analytics_id', ''); ?>"></script>
|
||||||
<?php endif; ?>
|
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('js',new Date());gtag('config','<?php echo akina_option('google_analytics_id', ''); ?>');
|
window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag('js',new Date());gtag('config','<?php echo akina_option('google_analytics_id', ''); ?>');
|
||||||
</script>
|
</script>
|
||||||
|
<?php endif; ?>
|
||||||
</head>
|
</head>
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
<div class="scrollbar" id="bar"></div>
|
<div class="scrollbar" id="bar"></div>
|
||||||
|
|
Loading…
Reference in New Issue