All boomerang utility functions are under the BOOMR.utils
namespace.
To access any of the following, dereference the BOOMR.utils object. eg: use BOOMR.utils.getCookie()
to call the getCookie()
method.
Gets the value of the cookie identified by sName
.
sName
. This may be the empty string.null
if the cookie wasn't found or if sName
was empty.
Sets the cookie named sName
to the serialized value of oSubCookies
.
null
, it will
use the value of site_domain
that was configured during the call to BOOMR.init().
You probably want to set this to null
.
Note that the entire cookie name and value needs to be less than 4000 characters.
The BOOMR.plugins.RT
plugin uses this function like this:
if(!BOOMR.utils.setCookie( impl.cookie, { s: t_start, r: url }, impl.cookie_exp, "/", null )) { BOOMR.error("cannot set start cookie", "rt"); return this; }
true
if the cookie was set successfullyfalse
if the cookie was not set successfully
Parse a cookie string returned by getCookie()
and split it into its constituent subcookies.
The BOOMR.plugins.BW
plugin calls this function like this:
var cookies = BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(impl.cookie));
null
if sCookie
was not set or did not contain valid subcookies.
Removes the cookie identified by sName
by nullifying its value, and making it a session cookie.
Nothing useful.
Convenience method that plugins can call to configure themselves with the config object passed in to their init()
method.
init()
method.BOOMR.plugins
object.
The BOOMR.plugins.RT
plugin uses this method like this:
BOOMR.utils.pluginConfig(impl, config, "RT", ["cookie", "cookie_exp", "strict_referrer"]);
true
if at least one property was set.false
if no properties were set or if the oConfig object was not set.The latest code and docs is available on github.com/SOASTA/boomerang