Tracking each time someone click's a pdf

Discussion in 'HTML' started by Peter, Jan 14, 2006.

  1. Peter

    Peter Guest

    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.
    Peter, Jan 14, 2006
    #1
    1. Advertising

  2. 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
    David Dorward, Jan 14, 2006
    #2
    1. Advertising

  3. __/ [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
    Roy Schestowitz, Jan 14, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jukka K. Korpela

    Re: Tracking .pdf downloads

    Jukka K. Korpela, Jun 13, 2004, in forum: HTML
    Replies:
    1
    Views:
    390
    Klaus Johannes Rusch
    Jun 13, 2004
  2. Weyoun the Dancing Borg

    Re: Tracking .pdf downloads

    Weyoun the Dancing Borg, Jun 13, 2004, in forum: HTML
    Replies:
    4
    Views:
    411
    Jan Harders
    Jun 13, 2004
  3. flamesrock
    Replies:
    8
    Views:
    434
    Hendrik van Rooyen
    Nov 24, 2006
  4. Ricardo Pog
    Replies:
    1
    Views:
    395
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    338
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page