Google released the new Analytics.js
(https://developers.google.com/analytics/devguides/collection/analyticsjs/). I would like to use it, and I already have everyting set up just fine, apart from site speed.
In the "old" ga.js
you could do this with
_gaq.push(['_setSiteSpeedSampleRate', 50]);
This would set it so 50% of the visitors would report sitespeed to analytics.
However, for the new analytics.js
I cannot get it to work. I tried the following 2:
ga('send','setSiteSpeedSampleRate',50);
ga('setSiteSpeedSampleRate',50);
But no results. Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…