Forum Moderators: DixonJones
Anyone got ideas on this one?
To correctly match the conversion hit to the first hit of the visit, you will have to have a cookie given out by your site. If you don't give out a cookie, then you can try to rely on the IP address method, which is iffy. The cookie method is iffy also because your visitor's browser has to accept cookies.
There are other, much more difficult ways of doing this same thing; this is how it is almost always done though.
Of course you don't necessarily have to have analytics software. For one thing, you can open log files and do the tracing yourself, visit by visit.
Thanks,
Cut-n-paste from the original post:
THIS ASP CODE SETS THE COOKIE. IT MUST GO ABOVE EVERY OTHER LINE OF CODE ON YOUR PAGE - ABOVE THE <HEAD> TAG. Change "SITENAME" to your site name (something totally unique).
<%
if request.cookies("SITENAME")="" then
vRef = Request.ServerVariables("HTTP_REFERER")
response.cookies("SITENAME")("Referer") = vRef
response.cookies("SITENAME").expires = now + 720
end if
%>
ON YOUR EMAIL FORM OR SHOPPING CART FORM YOU NEED TO CAPTURE THE REFERRER FROM THE COOKIE AND PUT IT IN A HIDDEN FIELD:
<input type="hidden" name="Referer" value="<%=Server.HTMLEncode(request.cookies("SITENAME")("Referer"))%>">
WHEN USING AN ASP SENDMAIL FORM LIKE WE USE, YOU SIMPLY REQUEST THE 'REFERRER' AS YOU WOULD ANY OTHER FIELD FROM THE FORM.
vReferer = request.form("Referer")