Browse Source

增加google analytics

gsgundam 5 years ago
parent
commit
43225a831a
1 changed files with 11 additions and 0 deletions
  1. 11 0
      application/index/view/base/header.html

+ 11 - 0
application/index/view/base/header.html

@@ -90,6 +90,17 @@
         scrolltotop.init();
     </script>
 <!-- <script async src="__IBOXS__/js/adsbygoogle.js"></script> -->
+
+    <!-- Global site tag (gtag.js) - Google Analytics -->
+    <script async src="https://www.googletagmanager.com/gtag/js?id=UA-23797657-5"></script>
+    <script>
+        window.dataLayer = window.dataLayer || [];
+        function gtag(){dataLayer.push(arguments);}
+        gtag('js', new Date());
+
+        gtag('config', 'UA-23797657-5');
+    </script>
+
     <script data-ad-client="ca-pub-1101808529197281" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 <style type="text/css">
         /*正文样式*/