Forum Moderators: DixonJones
If you could do this you can trace the referring URL when you make a sale. I realise this is relatively easy where you are requesting a login but what about where you don't?
I'm using a tracking system, which does something like that. It's based on javascript and cookies. When user comes to one of my sites from a search engine the search engine and search phrase is registered. This information is then matched to conversions like a sale, which in turn will show which SE's and keywords generate sales. It's actually quite simple.
You can also set a cookie based on the referring URL, if any. (It's pretty common for people to hit my site and not provide a referer for whatever reason).
Regardless of how you decide what cookie to set, when you make a sale, your sale script can look at that cookie and make note of the origin of the user that made the purchase.
Instead of setting a cookie, you can keep this kind of information in the query string (or just the main body part) of the URLs that you feed the user. This is analagous to keeping track of session ids in the query string instead of cookies. It somewhat requires that most/all of your site be generated or at least changed on the fly. It does mean that you can keep better track of people that don't use cookies, but sometimes you end up with links to your site with these IDs buried in them. It's a trade-off.
If you would like more thorough usertracking, you can set a unique cookie on each person and record the cookies presented in your logs. You can then generate somewhat of a clickstream analysis report for what the common paths through your site are, or whatever you're looking for. Apache has a mod_usertrack module to help you with this. This is a really deep subject and you can spend all of your time following people around your site. (I spend a lot of mine).
If you're interested more in aggregate information, such as what are the most common paths through your site, you can pull that out of your logs and massage it without too much trouble. I happen to write my logs to a SQL database as well as the regular files. I then use some scripts based on some stuff that Randall Schwartz wrote up at [stonehenge.com...] That makes some pretty pictures of where people are coming from and how they navigate through my site.
Hope that helps you out a bit.
-Andy
I’m certainly interested in clickstream analysis but I’m way off that. Which leads me to an admission – I left out part of the story yesterday. A crucial part.
I manage an affiliate site i.e. we’re an affiliate of other suppliers. The major drawback here is that only the product descriptions are hosted on our server. Once someone wants to check prices or book then you’re off our server and onto our supplier.
That’s not quite as disastrous as it sounds because we are branded all the way through and can add whatever we like to the frames on our suppliers site. My idea was to have an onclose popup on the final confirmation page which, when closed, sends us the customers I.P. address. It’s a long-winded and somewhat irritating method but I can’t think of anything cleaner.
So, if that works, I’ll get the information required on the way out. I just need to know the referral page on the way in. How difficult is it to set a cookie on the entry page to trap the referring page?