no page speed data

199 views
Skip to first unread message

Jason Sheldon

unread,
Aug 15, 2014, 3:22:59 AM8/15/14
to google-analyti...@googlegroups.com
Hi

I have the following code in my pages:-

<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','//www.google-analytics.com/analytics.js','ga');
 
  ga('create', 'UA-53651747-1', 'auto');
  ga('send', 'pageview');
  ga('create', 'UA-53651747-1', {'siteSpeedSampleRate': 100});
 
</script>

I however have not seen any page speeds in analytics for over a week now

It just says

0 of pageviews sent page load sample

Can any one help point out what I am doing wrong.

Many thanks

Jason

Philip Walton

unread,
Aug 15, 2014, 12:37:52 PM8/15/14
to Jason Sheldon, google-analyti...@googlegroups.com
You're creating a tracker twice, and after the second time (the one with the correct sample rate) you're not sending the pageview.

Try this instead:

ga('create', 'UA-53651747-1', 'auto', {'siteSpeedSampleRate': 100});
ga('send', 'pageview');




Jason

--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages