mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-02-07 09:19:00 +00:00
Update Google Analytics
This commit is contained in:
parent
4c9617b45a
commit
a1a35db157
@ -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.
12
_includes/google-analytics.html
Normal file
12
_includes/google-analytics.html
Normal 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>
|
||||
|
@ -15,9 +15,6 @@
|
||||
|
||||
{%- include footer.html -%}
|
||||
|
||||
{%- if jekyll.environment == 'production' -%}
|
||||
{%- include analytics.html -%}
|
||||
{%- endif -%}
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user