Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (75 sloc) 2.82 KB
<title>Boomerang Howto #1b: User clicks a link on a page we control and page is usable at some developer determined point</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../boomerang-docs.css">
<span style="float:right;"><a href="../">All Docs</a> | <a href="index.html">Index</a></span>
<h1>Boomerang Howto #1b:<br>User clicks a link on a page we control and page is usable at some developer determined point</h1>
See <a href="../use-cases.html#uc-1">use case #1</a> for a description of this requirement.
We use two pages for this use case. They may be any two pages on your site, and the code you put into them
is identical, so you could just put it on all pages on your site. Unlike case 1a, in this case, we do not
allow the beacon to fire when the onload event fires. Instead, we fire the <code>page_ready</code> event
when we determine that the page is ready. We also set the <code>autorun</code> parameter to false to stop
boomerang from running automatically.
<li>Copy boomerang.js and the images/ directory into your document root</li>
<li>Add the code below to all your pages. You may add it at any point before your page is considered complete.</li>
&lt;script src="boomerang.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
user_ip: "&lt;user's ip address&gt;",
beacon_url: "",
autorun: false
The rest of your page will load normally. When you determine (through javascript, perhaps) that your
page is usable by a user browsing your website, you need to fire the <code>page_ready</code> event like this:
BOOMR.page_ready(); // Tell boomerang that the page is now usable
As in howto-1a, you need to populate the <code>user_ip</code> field using a back end programming language.
Go to <a href="howto-1b-page%232.html">Page #2</a> now to see the results of the page load test.
<p class="perma-link">
The latest code and docs is available on <a href=""></a>
<p id="results">
<script src="../../boomerang.js" type="text/javascript"></script>
<script src="howtos.js" type="text/javascript"></script>
<script type="text/javascript">
user_ip: '',
autorun: false,
BW: {
base_url: '../../images/',
cookie: 'HOWTO-BA'
RT: {
cookie: 'HOWTO-RT'
// Fire the page_ready event after 750ms
setTimeout(function() { BOOMR.page_ready(); }, 750);
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Copyrights licensed under the BSD License. See the accompanying LICENSE.txt file for terms.
Something went wrong with that request. Please try again.