it's a little hard to demonstrate without coding the entire thing, but basically you use the onclick event of your links to fire a function:
<a href="#" onclick="reDir('one.htm'); return false">go to page one</a>
<a href="#" onclick="reDir('two.htm'); return false">go to page two</a>
that function checks if there is a query string already attached to the page, grabs it, and redirects to the address that you have passed to it, adding the existing query string plus one at the end ("home" in this example, but you have to change that depending on the page you are on) to "mark" that the user has been here:
function reDir(thepage){
var query = window.location.search.substring(1);
window.location.href=thepage+"?"+query+"home&";
}
as you go through the pages, you will end up with an address that looks something like this:
www.mysite.com?home&one&two&three
once you get to the final page you can have another function that splits the query string off (again using window.location.search.substring(1); ) and checks to see if the correct order has been followed.
there's a point there, I guess - does the order have to be correct - page one first, page two second - or can it just be that the users has seen all 5 pages? Either is possible, but the coding will be different.
hope that helps!