Track entrance / keyword when form is submitted

Discussion in 'Traffic Analysis' started by CanaryWoolf, May 25, 2006.

  1. #1
    Hope you can help.

    I'm hoping to include code on our site to enable me to know, when someone submits an enquiry exactly how they got onto our site.

    www.cavaliermailing.com

    I always ask enquirers how they found us (and it's usually Google PPC) but it would be useful to be pre-armed with that information.

    I guess it would be done by means of a session cookie but beyond that I'm stumped.

    Cheers

    CW
     
    CanaryWoolf, May 25, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    At the top of each page you need to check if a session is registered. If not then register a new cookie and reference that to a listing in a database that contains the session id, the referrer details and a timestamp. You can track other things as well if you wish.

    Then when your form is submitted you send the contents of the database row as well as the information.

    There are lots of scripts around to get the search terms from the referrer details.
     
    mad4, May 25, 2006 IP