Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Track hits on a link?

Reply
Thread Tools

Track hits on a link?

 
 
Mabden
Guest
Posts: n/a
 
      05-20-2004
I have a page that has a game on it, and I want to track how many people
download the file. I know how to track hits to the page, but can I track
clicks on the link itself?

Site: http://www.sitenook.com/
Link: http://www.sitenook.com/ishido.zip

The link is a Palm PDA game, so don't waste your time if you don't have a
color Palm device.

--
Mabden


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      05-20-2004
in post: <news:fAZqc.51505$(E-Mail Removed) .com>
Mabden <(E-Mail Removed)> said:

> can I track clicks on the link itself?


http://www.hotscripts.com/PHP/Script...lick_Tracking/
http://www.hotscripts.com/Perl/Scrip...lick_Tracking/
http://www.hotscripts.com/ASP/Script...lick_Tracking/


--
b r u c i e


 
Reply With Quote
 
 
 
 
Mabden
Guest
Posts: n/a
 
      05-20-2004
"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:fAZqc.51505$(E-Mail Removed) .com>
> Mabden <(E-Mail Removed)> said:
>
> > can I track clicks on the link itself?

>
> http://www.hotscripts.com/PHP/Script...lick_Tracking/
> http://www.hotscripts.com/Perl/Scrip...lick_Tracking/
> http://www.hotscripts.com/ASP/Script...lick_Tracking/
>
>

Kisses brucie, but those seem like whole apps, some costing $100. The
freebie I looked at had about 10 ASP scripts with logins, mySQL stuff, and
everything. Way overkill for my little Palm PDA game (a seen on
http://www.sitenook.com/ ).

I guess I could make the link go to its own asp file and use some
server-side redirect. So my new question is how can I "force" or "push" a
download from an ASP file.

index.htm has:
<a href=http://www.sitenook.com/ishido.asp> Download Ishido.Zip </a>

ishido.asp has:
Dim referer, browser, ip
referer = Request.ServerVariables ("HTTP_REFERER")
browser = Request.ServerVariables ("HTTP_USER_AGENT")
ip = Request.ServerVariables ("REMOTE_ADDR")

' code to save this stuff, I get this

' code to push the zip - How?

Just a hint would do...

--
Mabden


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      05-20-2004
in post: <news:Tr_qc.69800$(E-Mail Removed) om>
Mabden <(E-Mail Removed)> said:

> Kisses brucie, but those seem like whole apps, some costing $100.


asp Creating a Click-Through Tracking System tutorial
http://www.4guysfromrolla.com/webtech/012901-1.shtml

> The freebie I looked at had about 10 ASP scripts with logins, mySQL
> stuff, and everything.


you need something to store the stats, if not a db then a flatfile.

> I guess I could make the link go to its own asp file and use some
> server-side redirect. So my new question is how can I "force" or "push" a
> download from an ASP file.


no forcing or pushing involved. you just link to the script passing a
variable to identify the file the visitor wants to download (assuming
there is more than one file to download) not to the downloadable file
itself. once the script has done its goodies it sends a location header
to the requested file.

--
b r u c i e


 
Reply With Quote
 
Mabden
Guest
Posts: n/a
 
      05-20-2004
"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:Tr_qc.69800$(E-Mail Removed) om>
> Mabden <(E-Mail Removed)> said:
>
> > Kisses brucie, but those seem like whole apps, some costing $100.

>
> asp Creating a Click-Through Tracking System tutorial
> http://www.4guysfromrolla.com/webtech/012901-1.shtml
>
> > The freebie I looked at had about 10 ASP scripts with logins, mySQL
> > stuff, and everything.

>
> you need something to store the stats, if not a db then a flatfile.
>
> > I guess I could make the link go to its own asp file and use some
> > server-side redirect. So my new question is how can I "force" or "push"

a
> > download from an ASP file.

>
> no forcing or pushing involved. you just link to the script passing a
> variable to identify the file the visitor wants to download (assuming
> there is more than one file to download) not to the downloadable file
> itself. once the script has done its goodies it sends a location header
> to the requested file.
>



Maybe I didn't get what you were saying? If so bear with me...

I don't think I'm explaining what I mean. I have no problem tracking the
users who hit my site. A flat text file is fine, as I use a Perl script to
view hits. But now I have added a link to a zip file (one zip file,
containing one file). I want to know when someone has clicked on the
download link, which just downloads the file. I realize I could make a
second page that the link goes to, so I can use ASP to write more info to a
file (DB, flat file, whatever), but the point is, the user has clicked on a
link and expects it to "just download". They don't want to have to click
ANOTHER link to "really" download the file. I just want to capture the fact
that they clicked on the original link on my main page.

> ...it sends a location header to the requested file.

This may be the piece I need. But I don't understand what this means.


I'm guessing that there's no way. I hoped someone would tell me about a
JavaScript onclick function or
something...


--
Mabden


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      05-20-2004
in post: <news:U1%qc.69804$(E-Mail Removed) m>
Mabden <(E-Mail Removed)> said:

>> no forcing or pushing involved. you just link to the script passing a
>> variable to identify the file the visitor wants to download (assuming
>> there is more than one file to download) not to the downloadable file
>> itself. once the script has done its goodies it sends a location header
>> to the requested file.


> Maybe I didn't get what you were saying?


<a... /download.asp>

1. visitor clicks link

download.asp file:

2. get the variables you want (IP, referer etc)
3. open stats file
4. write variables to stats file not forgetting to increment count by 1.
5. close file.
6. send a location header for the file being downloaded at the end of
your script to the browser (in php it looks like this):

header("location: http://www.example.com/the-file.zip");

7. browser downloads file
8. write a script to read and format your stats file so it looks pretty.

> the user has clicked on a link and expects it to "just download".


thats what happens with the above, your fun giggly stats thingy is
transparent to the visitor. they click the link the file starts
downloading. easy.

> I hoped someone would tell me about a JavaScript


JS isn't suitable for this.


--
b r u c i e


 
Reply With Quote
 
Mabden
Guest
Posts: n/a
 
      05-20-2004
"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <news:U1%qc.69804$(E-Mail Removed) m>
> Mabden <(E-Mail Removed)> said:
>
> >> no forcing or pushing involved. you just link to the script passing a
> >> variable to identify the file the visitor wants to download (assuming
> >> there is more than one file to download) not to the downloadable file
> >> itself. once the script has done its goodies it sends a location header
> >> to the requested file.

>
> > Maybe I didn't get what you were saying?

>
> <a... /download.asp>
>
> 1. visitor clicks link
>
> download.asp file:
>
> 2. get the variables you want (IP, referer etc)
> 3. open stats file
> 4. write variables to stats file not forgetting to increment count by 1.
> 5. close file.
> 6. send a location header for the file being downloaded at the end of
> your script to the browser (in php it looks like this):
>
> header("location: http://www.example.com/the-file.zip");
>
> 7. browser downloads file
> 8. write a script to read and format your stats file so it looks pretty.
>
> > the user has clicked on a link and expects it to "just download".

>
> thats what happens with the above, your fun giggly stats thingy is
> transparent to the visitor. they click the link the file starts
> downloading. easy.
>
> > I hoped someone would tell me about a JavaScript

>
> JS isn't suitable for this.
>


Well that's fantastic! I've never heard of the location header. I will look
into it and I think it will work great. I'm assuming ASP can do the same
thing as PHP (since it's all HTML at the browser end)! Thanks very much for
the hand-holding. I'm always amazed at getting a straight (excuse the
expression) answer on a
newsgroup. ;?)

--
Mabden


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      05-20-2004
in post: <newsI%qc.69807$(E-Mail Removed). com>
Mabden <(E-Mail Removed)> said:

> Well that's fantastic!


and easy peasy

> I've never heard of the location header.


14.30 Location
The Location response-header field is used to redirect the recipient
to a location other than the Request-URI for completion of the
request or identification of a new resource. [...]
http://www.ietf.org/rfc/rfc2616.txt

> Thanks very much for the hand-holding.


i cant wait until we get to the heavy petting.

--
b r u c i e


 
Reply With Quote
 
Mabden
Guest
Posts: n/a
 
      05-20-2004
"brucie" <****@bruciesusenetshit.info> wrote in message
news:(E-Mail Removed)...
> in post: <newsI%qc.69807$(E-Mail Removed). com>
> Mabden <(E-Mail Removed)> said:
>
> > Well that's fantastic!

>
> and easy peasy
>
> > I've never heard of the location header.

>
> 14.30 Location
> The Location response-header field is used to redirect the recipient
> to a location other than the Request-URI for completion of the
> request or identification of a new resource. [...]
> http://www.ietf.org/rfc/rfc2616.txt
>
> > Thanks very much for the hand-holding.

>
> i cant wait until we get to the heavy petting.
>


<blushing>
Gee, no one ever asked before. But I feel like such a newbie...

Will you still respect my code in the morning...

--
Mabden


 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      05-20-2004
In article <nc0rc.69809$(E-Mail Removed)> ,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> > > Thanks very much for the hand-holding.

> > i cant wait until we get to the heavy petting.

> <blushing>
> Gee, no one ever asked before. But I feel like such a newbie...


Ohhhh.... a virgin.....

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert track reference in mp3 track D@Z Computer Support 1 05-02-2008 03:32 PM
Old certification track vs new certification track. Barkley Hughes MCAD 5 11-12-2006 02:41 PM
Cache hits are low on a Cisco Content Engine k86698@yahoo.com Cisco 0 12-30-2005 06:03 PM
OT: Neil hits 5k =?iso-8859-1?Q?Frisbee=AE?= MCSE 27 09-08-2004 11:45 AM
Number of hits divided by "robot hits" Dos-Man HTML 5 03-04-2004 07:56 AM



Advertisments