Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2004, 06:32 PM
WebProWorld New Member
 

Join Date: Mar 2004
Location: Boise, Idaho
Posts: 4
twist118 RepRank 0
Default Tracking visits using an ASP variable

Hi everyone! I'm new to this board, and from what I've viewed so far it looks like a great source of information.

I'm a graphic designer and basic web page developer (HTML and FLASH). My boss asked me today to look into setting up a variable in ASP, so I'm hoping someone here can help.

We have google adwords pay-per-click ads and would like to have the link go to (example) www.company.com/googleclick.asp. That page would create a unique ID or session (sorry I'm not familiar with the terminology) then redirect them to the main page www.company.com/

Then take it a step further and track thier session to see if they go to our contact us form and actually request information from us.

The purpose is to see if we are getting any real leads from our google ads.

So I guess I need help creating a session, then redirecting to the index page, then include the session ID in the results of our contact form.

Is this hard to do?
Reply With Quote
  #2 (permalink)  
Old 03-11-2004, 09:19 PM
WebProWorld Member
 

Join Date: Jan 2004
Location: Texas
Posts: 58
jwm5411 RepRank 0
Default

twist118, if I understand what you are trying to do...there may be an easier way to do this.
In the URL that you setup in Google AdWords add a query string to back of the URL. Like this:

http://www.yourcompany.com?source=google

This will direct the click on the add to your site and you can use your log file to track the visitors that have clicked on your Google ads. Most log analyzers now can capture and properly show these incoming links. You will have to setup the log analyzer.

You can use ASP to capture a server variable that contains the referring URL, but you have a good learning curve to do this and then do something with it.
__________________
John
Reply With Quote
  #3 (permalink)  
Old 03-12-2004, 04:52 PM
WebProWorld New Member
 

Join Date: Mar 2004
Location: Boise, Idaho
Posts: 4
twist118 RepRank 0
Default

Thanks - So if I understand you right, using the link http://www.yourcompany.com?source=google it will send them to the main page, but in the log files on the server, it will show the above adress, so I know it came from google.

But then how do I tell if they go to our request-for-information form during thier visit to our site?
Reply With Quote
  #4 (permalink)  
Old 03-13-2004, 09:19 AM
paulhiles's Avatar
WebProWorld 1,000+ Club
 

Join Date: Jul 2003
Location: UK
Posts: 2,803
paulhiles RepRank 0
Default

Quote:
Originally Posted by twist118
But then how do I tell if they go to our request-for-information form during their visit to our site?
If your request form is held on a different page, then you will see (by checking your logs) the same IP address making a HTTP request for your form's page.
Much of this available detail depends on how much access you have to your server's logfiles or the level of sophistication in your site statistics software.
Reply With Quote
  #5 (permalink)  
Old 03-15-2004, 06:01 AM
WebProWorld Member
 

Join Date: Jan 2004
Location: Texas
Posts: 58
jwm5411 RepRank 0
Default

Twist118, the last portion of what you want to do can be followed in the server logs, but if you want to learn ASP...this is a good place to start.
I've listed below the basics to writing the ASP code you need for this project.
The steps you need to take are:

1. capture the incoming URL from the HTTP_REFERER server variable by setting it = to a session variable.
Roughly like this on the page that gets the click from google:

<%
Session("incomingUrl") = request.servervariables"HTTP_REFERER")
%>
You will need to use a .asp extension on this page.

3. When the visitor goes to your contact form, setup a hidden textbox and set its text value = to Session("incomingURL"). Again this will need to be an ASP page. When the form is posted, the hidden textbox will post the data to the same place that you post the rest of your form data.

You should get a book on ASP. What you are trying to do is not difficult, but you will need to learn a few basics to get it right.
__________________
John
Reply With Quote
  #6 (permalink)  
Old 03-16-2004, 08:01 AM
sijpie's Avatar
WebProWorld Pro
 

Join Date: Sep 2003
Location: Scotland
Posts: 108
sijpie RepRank 0
Default

You can even combine the two methods above for better easier checking (afterall they could have come from google, but not through the paid for ad).

So set up the session variable only for those visitors which have the source=google variable.

Do this by (in asp) getting the source:

session("advert")=request("source")


then use jwm5411's method (3) to add the extra data to your form:
<form>
<Input type="hidden" name="advert" value="<%=session("advert")%> />
...
</form>

You can use this with a number of companies you place an advert with, by using different names, and they will all nicely end up in your form submissions.

Note however that some will go astray: if a guest leaves his browser idle for a while (normally 20 min) the session will time out and the session variable is deleted.
__________________
Jaap

PalmVenue
Broekhuizen Paintings
MacSijp

You've done it all
You've broken every code (Steve Harley)
Reply With Quote
  #7 (permalink)  
Old 03-16-2004, 01:46 PM
WebProWorld New Member
 

Join Date: Mar 2004
Location: Boise, Idaho
Posts: 4
twist118 RepRank 0
Default Thank You

Thanks sijpie and jwm5411!

I think this is exactly what I want to do... but it's not quite working yet.

The first part works where the advert link goes to Http://www.company.com/products.asp?...=google_advert
Is there supposed to be asp code on this products.asp page that starts a session? I tried putting the following code on the products.asp page:
<body>
<%source=request.servervariables("http_referer") %>
</body>

The second part is still not working... Here is a copy/paste from my contact.asp page code:

<%session("advert")=request("source")%>
<FORM NAME="form_1" ACTION="http://www.company.com/contact-script.asp" METHOD="POST">
<input name="advert" type="hidden" id="advert" value="<%=session("advert")%>"></td>
...other stuff...

ALSO - a programmer that used to work with me, wrote an .asp file that processes our contact form (contact-script.asp). It is really hard to use, but something in our server prohibits us from being able to use some of the other form processors out there. (aspmail.asp) So, I was thinking maybe part of the problem is the asp file that is compiling the information from our form. I added the field "advert" to be included in the form submission results on the contact-script.asp page

Msg = "New Web Contact Received" & Now & VBCRLF & _
"Source: " & Request.Form("advert") & VBCRLF & _
"First Name: " & Request.Form("firstname") & VBCRLF & _
...more...

My results show:
New Web Contact Received3/16/2004 10:21:05 AM
Source:
First Name: Fred
...more...
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Tags: , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0