Try this way,
In your Tracking code ga.js
....
_gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);
_gaq.push(['_setSiteSpeedSampleRate', 100]);
_gaq.push(['_trackPageview']);
....
analytics.js
ga('create', 'UA-XXXX-Y', {'siteSpeedSampleRate': 100}); // Creates a tracker.
ga('send', 'pageview'); // Sends a pageview.
The first line calls the create command, and the second line calls the send command.
More Documentation and Advanced Configuration