On every page within the <head>
section, I have included the following code:
<script type="text/javacript">
(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-aaa-bbb', 'auto');
ga('send', 'pageview');
</script>
I've noticed that it has been two days and there are no sessions being recorded. When I check Chrome developer panel, I can't see any traffic being sent to Google Analytics when I visit my website. However, everything appears to be correctly set up in the dashboard.
Update:
I found 2 errors:
1) No HTTP response detected
2) Missing analytics.js script
This raises the question: Why is analytics.js necessary?