is cookies + redirect a technically sound tracking method ?

Discussion in 'Programming' started by jersh, Jun 26, 2006.

  1. #1
    Originally I was pointing all of my ads (google, banners, etc.) to just my plain URL:

    http://www.example.com

    Recently, I have decided not to rely on my customers telling me in their signup form "where did you hear about us", and decided I wanted to track where they clicked from (google, oher sites, etc.) and what keyword they searched with.

    So I wrote a very simple cgi script, conv.cgi, and pointed my ads to this URL instead:

    http://example.com/cgi-bin/conv.cgi?site=google&campaign=campaign1

    conv.cgi is extremely simple - all it does is set three cookies - one for each of the two variables you see in the URI above, and one for the current date/time, and then after setting those three cookies, it does a redirect to my home page.

    Easy. Set three cookies, then redirect. I tested it, and it works.

    The problem is, I am paranoid that somehow there are people out there this won't work for. Like setting cookies or doing a redirect will drop some people, or that somehow they won't make it to my site after clicking on a banner or google ad ... perhaps it is irrational, but I just want to confirm that there are no technical issues involved with having a banner click point to a cgi that sets some cookies and then redirects.

    - is my method, pointing my ad to a cgi script, which sets some cookies and then redirects, a good one ? Is this what everyone does, pretty much ? Is this the good-old-standby way of doing it ?

    - does this method not work for some people ? Is it possible that some browsers/platforms are not redirecting them through correctly ?

    Thanks. All comments appreciated.
     
    jersh, Jun 26, 2006 IP
  2. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think people are setting the cookies in plain old PHP pages. Your ads could just point to a regular page, where those cookies are set and which runs the script.

    Doing so, potentially broadens the capture and does not require redirects. That will result in a nominal decrease in extraneous traffic, which can be an issue at those times of the day when your site is busiest.

    Cookies work as long as people accept cookies. Some turn that off for their own privacy and/or security reasons.
     
    clancey, Jun 26, 2006 IP
  3. jersh

    jersh Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Gotcha.

    But if someone does not accept cookies, they still get redirected, right ?

    So the worst case scenario is that I just don't set the cookies - there is no case where someone just doesn't successfully make it to the redirected page ?
     
    jersh, Jun 26, 2006 IP
  4. clancey

    clancey Peon

    Messages:
    1,099
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Correct. Redirects have nothing to do with cookies. People will end up on the target page but without cookies.
     
    clancey, Jun 27, 2006 IP