Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Tracking each time someone click's a pdf

Reply
Thread Tools

Tracking each time someone click's a pdf

 
 
Peter
Guest
Posts: n/a
 
      01-14-2006
Does anyone know where I can find sample code that will help me track
whenever a user clicks on a pdf file ? My Isp provides me with a
logfile but it doesn't give me any type of description of what pdf it
was. Ideally I shouldn't even have to look at the log file.

I can see:
12 12675231 /broch/111100167.pdf

But I need something that will give a description like
12 12675231 /broch/111100167.pdf 8754 First St. San
Jose


Thanks,
Pete

ps. renaming the file by combining the file name + description isn't an
option.

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      01-14-2006
Peter wrote:

> Does anyone know where I can find sample code that will help me track
> whenever a user clicks on a pdf file ? My Isp provides me with a
> logfile but it doesn't give me any type of description of what pdf it
> was. Ideally I shouldn't even have to look at the log file.
>
> I can see:
> 12 12675231 /broch/111100167.pdf
>
> But I need something that will give a description like
> 12 12675231 /broch/111100167.pdf 8754 First St. San


I'd write a script that could read the log file and add the description to
it. It should be pretty trivial depending on where the description comes
from.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Roy Schestowitz
Guest
Posts: n/a
 
      01-14-2006
__/ [Peter] on Saturday 14 January 2006 00:31 \__

> Does anyone know where I can find sample code that will help me track
> whenever a user clicks on a pdf file ? My Isp provides me with a
> logfile but it doesn't give me any type of description of what pdf it
> was. Ideally I shouldn't even have to look at the log file.
>
> I can see:
> 12 12675231 /broch/111100167.pdf
>
> But I need something that will give a description like
> 12 12675231 /broch/111100167.pdf 8754 First St. San
> Jose
>
>
> Thanks,
> Pete
>
> ps. renaming the file by combining the file name + description isn't an
> option.



If you have a Linux box or emulation of Linux on another operating system,
apply the following example command to your log file.

sed 's/111100167.pdf/111100167.pdf 8754 First St. San Jose/i;'
logfile_input >logfile_output

sed 's/111100168.pdf/111100168.pdf 8789 Somewhere/i;'
logfile_input >logfile_output

[...]

It's a batch-mode search-and-replace (make it a script to replace everything
you typically would), which you can periodically run on a Linux server, for
example. I am not sure what you are trying to achieve, but I imagine that
you want to deliver a client a self-explanatory log file.

Hope it helps,

Roy

--
Roy S. Schestowitz | "World ends in five minutes - please log out"
http://Schestowitz.com | SuSE Linux | PGP-Key: 0x74572E8E
4:50am up 34 days 12:01, 14 users, load average: 0.89, 0.83, 0.75
http://iuron.com - next generation of search paradigms
 
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
Postscript to PDF with pdf-tools, pdf-writer, or other Sean Nakasone Ruby 1 04-14-2008 09:13 PM
PDF::Writer, create pdf and insert in other pdf file. Ricardo Pog Ruby 1 03-26-2008 08:24 PM
Is time.time() < time.time() always true? flamesrock Python 8 11-24-2006 06:51 AM
Tracking Someone Tracking Me Edw. Peach Computer Security 4 07-07-2005 05:50 PM
Re: Tracking .pdf downloads Jukka K. Korpela HTML 1 06-13-2004 09:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57