The roundtrip plugin measures page load time, or other timers associated with the page. Its API
is encapsulated within the BOOMR.plugins.RT namespace.
All roundtrip plugin configuration items are under the RT namespace.
The full configuration object is described in Howto #6 — Configuring boomerang.
RT.
Set this to a falsy value like null or the empty string to ignore cookies and depend completely on the
WebTiming API for the start time.
RT cookie doesn't match
the current page's document.referrer. This is so because it generally means that the user visited a
third page while their RT cookie was still valid, and this could render the page load time invalid.strict_referrer to false
Called by the BOOMR.init() method to configure the roundtrip plugin.
BOOMR.init(). See the Configuration section for details.
a reference to the BOOMR.plugins.RT object, so you can chain methods.
Starts the timer named sName. Timers count in milliseconds. You must call
endTimer() when this timer has complete for the measurement to be recorded
in boomerang's beacon.
If passed in, the optional second parameter nValue is the timestamp in milliseconds
to set the timer's start time to. This is useful if you need to record a timer that started
before boomerang was loaded up.
boomerang was loaded and now need to pass that value to the
roundtrip plugin.
See Howto #4 for an example that uses startTimer and endTimer.
a reference to the BOOMR.plugins.RT object, so you can chain methods.
Calling startTimer("t_page") has the side-effect of calling endTimer("t_resp").
These timers are generally used to measure the time from (as close to) the first byte loaded to onload
(t_page) and from onbeforeunload to the first byte time (t_resp).
You do not need to explicitly call startTimer("t_resp").
Stops the timer named sName. It is not necessary for the timer to have been started
before you call endTimer(). If a timer with this name was not started, then the unload
time of the previous page is used instead. This allows you to measure the time across pages.
boomerang was loaded and now need to pass that value to the
roundtrip plugin.
See Howto #4 for an example that uses startTimer and endTimer.
a reference to the BOOMR.plugins.RT object, so you can chain methods.
Sets the timer named sName to an explicit time measurement. You'd use this method if you
measured time values within your page before boomerang was loaded and now need to pass
those values to the roundtrip plugin for inclusion in the beacon. It is not necessary to call
startTimer() or endTimer() before calling setTimer(). If you
do, the old values will be ignored and the value passed in to this function will be used.
a reference to the BOOMR.plugins.RT object, so you can chain methods.
Typically called automatically when boomerang's page_ready event fires, but it may also be called explicitly to measure the load time of transitions that do not involve a onload event.
This method calculates page load time, and determines whether the values we have are good enough
to be beaconed. It then signals the BOOMR object via its sendBeacon
method.
See Howto #2 for an example of explicitly calling the done() method.
a reference to the BOOMR.plugins.RT object, so you can chain methods.
Called by BOOMR.sendBeacon() to determine if the roundtrip plugin has finished what it's doing or not.
true if the plugin has completed.false if the plugin has not completed.This plugin adds the following parameters to the beacon:
name|valuer and strict_referrer has been explicitly turned off.cookie for the start cookie, navigation for the W3C navigation timing API, csi for older versions of Chrome or gtb for the Google Toolbar.onbeforeunload event. This is typically used to find out how much time the user spent on the page before leaving, and is not guaranteed to fire.onbeforeunload event fires before the onload event fires. This can happen, for example, if the user left the page before it completed loading.onbeforeunload event fires before the page ever became visible. This can happen if the user opened the page in a background tab, and closed it without viewing it, and also if the page was pre-rendered, but never made visible. Use this to check your pre-render success ratio.The latest code and docs is available on github.com/SOASTA/boomerang