0

I implemented GA on my latest project. The web part of project is done using angularjs1 framework.

I have a strange issue. I have implemented GA on Android, iOS and web. The issue is that the screen views count for web is always showing zero. But I can see a number on total 553 and unique screen views 214. I am tracking screens via setting virtual page views

https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications

Here is my code workouts

on my index.html

<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');
</script>

on my app.js run.inject

$window.ga('create', 'UA-my-tracker-id', 'auto');

On my controller

 $window.ga('set', 'page', 'home-web');
 $window.ga('send','pageview');

I am attaching my GA statistics screenshot

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
M14
  • 1,780
  • 2
  • 14
  • 31

1 Answers1

1

I am answering to my question since i found the solution and may be helpful to someone who faced the similar issues.

The reason was when i created the tracker account before two years back i set the "What would you like to track?" field to mobile app.

I created another tracker with type website.Now everything works fine. Now I have two trackers.one for mobile app and one for web app.And one more thing i found that for mobile app google recommends fire base analytics

https://support.google.com/analytics/answer/2587087?hl=en
M14
  • 1,780
  • 2
  • 14
  • 31
  • Thanks for this! Solved my problem. I'd accidentally created a Mobile App property rather than a Website property. – Sam Dutton Feb 20 '19 at 17:47