Open Paolo1991 opened 8 years ago
Same problem here
@privetr you still need add google analytics script. You add this code before the angularytics define:
<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','//www.google-analytics.com/analytics.js','ga'); ga('create', 'YOUR ANALYTICS KEY', 'auto'); ga('send', 'pageview'); </script>
Maybe you may add it in README or in any documentation page. Thanks :)
@vanthanh9176 the Google analytics script should be added within the index.html, correct?
Yes, Google analytics script have to add within the index.html
I installed angularytics and follow the doc, but when i run i meet error: ReferenceError: ga is not defined