sfbrigade/sf-crime-data

Google Analytics Broken - Need to Re-Add GoogleAnalyticsObject to index.html

Closed this issue · 3 comments

Expected behavior

Google Analytics tracks some stats.

Actual behavior

Google Analytics isn't tracking anything.
arc.ai reports zero traffic.

Steps to fix

It looks like the Google script got deleted at Merge pull request #61 from sarah-clements/feedback-form. OOPS! I didn't catch that when I did the pull.

Need a fix fast as marketing e-mails are going out to universities and colleges this week: "Live Beta Starts".

Need someone to re-add the following code to index.html in both the "live" branch (gh-pages) and dev branch to re-enable Analytics.

<script> (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', 'UA-87188531-1', 'auto'); ga('send', 'pageview'); </script>

I can take this one.

See #76 and #77 which address this issue.

Traffic stats are adjusted to post daily and are now reporting "real numbers".