Update Google Analytics

This commit is contained in:
foo-dogsquared 2018-09-30 18:30:19 +08:00
parent 4c9617b45a
commit a1a35db157
4 changed files with 14 additions and 3 deletions

View File

@ -46,6 +46,8 @@ plugins:
pinpost: ["A Freebie's Resource List (Mostly Related to Programming)", "An Absolute Beginners' Complete Web Development Resource List"]
google_analytics: UA-126718538-1
# Default settings
defaults:
-

Binary file not shown.

View File

@ -0,0 +1,12 @@
<script>
if(!(window.doNotTrack === "1" || navigator.doNotTrack === "1" || navigator.doNotTrack === "yes" || navigator.msDoNotTrack === "1")) {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
}
</script>

View File

@ -15,9 +15,6 @@
{%- include footer.html -%}
{%- if jekyll.environment == 'production' -%}
{%- include analytics.html -%}
{%- endif -%}
</body>
</html>