We are using google analytics in our application and getting strange results when tracking page load time. The data for most of the pages is 0 while few pages have the values. Now if we compare these pages with our qa sites , page load time has a value. Nothing has changed on these pages when we move to production except that we have a different tracking code and the application is available publicly. From screen shot below, you can see that we have data only for few days.
I am not sure what is happening here. Any pointers will be appreciated.
This is our code
<script type="text/javascript">
(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', "my-google-analytics-code", 'auto');
ga('send', 'pageview', {'page': (location.pathname+location.search+location.hash)});
</script>
Site speed is only tracked on 1% of visitors by default so it's likely nothing has been recorded yet for those pages, you can increase this by editing the ga('create'
part of your code
ga('create', 'UA-XXXX-Y', {'siteSpeedSampleRate': 10})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.