I'm trying A/B test a number of landing pages. I need some Javascript code that will replace the breadcrumbs and logo URL for the homepage across the whole site depending on which landing page the user visits. So if they land on page B, but then navigate to page X, they can click on the logo to return to page B.
My original site has:
<a id="logo" href="A"></a>
<p id="breadcrumbs"><a href="A"></a></p>
And I need the code to do something like:
if page B has been visited {
(#logo).href(B);
(#breadcrumbs a).href(B)
}
if page C has been visited {
(#logo).href(C);
(#breadcrumbs a).href(C)
}
Is it even possible to do this across the whole site, or would it only change urls on this page?
Could I drop a cookie on page B and use the cookie as my condition?
if user has cookie C {
(#logo).href(C);
(#breadcrumbs a).href(C)
}