Welcome to WebmasterWorld Guest from 220.127.116.11
Your database will record all the purchases made, and you then have to figure out how to marry the figures from the database and the server logfiles.
This is the norm, right?
But let's suppose you want more info about specific purchases to be recorded on the web server. How do you go about it? Is it a case of building some additional pages (redirects maybe) that store info on what is being purchased, before the user is brought to the confirmation page? Or is there a better way of achieving this?
Any views on this?
Get your dbase to write to a separate logfile, recording purchase details and keying them to the session ID assigned when the visitor hit your site. Have the marketing site write cookies, or write to the same dbase for "normal" web traffic. Report on both
Surfer hits your site, from google, search string = blue widgets. Your server records the session ID, referring domain and search string in a cookie. After a click or two, they go to your cart and buy a widget. The cart writes the session ID, purchase value and item to a separate logfile. Your consolidated log analysis tool reads both logs, relates the 2 items using the session ID as the primary key, and reports sales by SE by keyword to you. Cool, huh?
There are variations on that theme depending on your skills and preferences, but you get the idea, I'm sure. You just need a primary key somewhere, and you're home
Let's say, I want to track the success of a recent email campaign. I want to know for each click-thru, how many went on to buy a product, and exactly what product they ordered.
As far as I know, my web stats packages alone, will not give me all this info (mainly because of the difficulty getting specific purchase details).
Now I know the product purchase details are held in the database, but I would prefer if this was also available from the server logs.
I'm asking for too much here, probably :-)
A cheap'n'easy session cookie method could be; list the cookies (inc. your session token) in your logs, interrogate the headers on the server side and store that session token alongside a purchase record.
It's not perfect but it would allow you to join logs to purchase information with very little effort.
If Session("referrer") = "" Then
Session("referrer") = Request.ServerVariables("HTTP_REFERER")
Then I insert this with order info into the order table of the DB.