uRoute - User Route Tracking
Welcome to the demonstration page for the uRoute plugin written by Scott Brooks at UserFirst Interactive. This plugin was created to further our goals here at UserFirst and extend our tracking methods so that we can get more robust data from our users while they are on our website. This plugin is intended to give our analytics team a view into the routes users take through our website, recording their path over a 24 hour period.
This plugin is very simple to install. Just add the following code to the header of your website or include it manually on each page.
<script type="text/javascript" src="js/jquery.js"></script> <script type="text/javascript" src="js/jquery.url.packed.js"></script> <script type="text/javascript" src="js/jquery.cookie.js"></script> <script type="text/javascript" src="js/uRoute.js"></script>
How does this code track your user's route?
By adding this plugin to your header, as soon as the user arrives at a page, the url of that page is saved to the user's cookie. Each url added to the cookie is the current relative path separated by a pipe "|". So if you've arrived here from the root of the creations subdomain (http://www.userfirst.com/creations/) and then came straight to this page, your cookie will have the string "/|/uroute/".
If you want to handle tracking routes between your primary domain and subdomains, you can make a quick change to the uRoute.js file by changing the URL string from being relative as it is set currently:
jQuery.url.attr("relative")
to the following for tracking the whole URL (i.e. creations.userfirstinteractive.com/uroute/).
jQuery.url.attr("host") + jQuery.url.attr("relative")
Now you can track across subdomains!
When should I harvest the value of this cookie?
You could set this up to work a number of ways. I'd recommend tying this in with pages where you are tracking coversions. For instance, a thank you page on your website that displays after the user fills out a form. Another idea might be to pull the cookie data when a user downloads a file, or when they click an external link, leaving your site.
See where you've been on our website:
CLICK HERE TO SEE YOUR TODAYS SURFING HISTORY!
CLEAR YOUR COOKIE HERE IS YOU WANT TO TEST IT AGAIN!
Download
Plugin
Requires the Cookie Plugin for jQuery written by Klaus Hartl and the jQuery URL Parser by Mark Perkins. (included)
Download version:
Version 1.0 - uRoute js files + dependencies
Download the complete demo here.
Questions? Comments?
We'd love to hear from you! Visit our blog and let us know what you think of our creations!
