1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

tracking codes

Discussion in 'Software' started by mezziG, Jul 5, 2007.

  1. mezziG

    mezziG Private E-2

    Hi guys, I've been searching for an answer to this question for ages. Hopefully someone here can help or point me in the direction of someone/where that can.

    I have a website that I use for business. I want to be able to track people who come in. I have a tracking code from google that works really well if they click on the ad and then stay on the one page but often they click on the ad, arrive at the page where they're tracked and then actually sign up for something on a different page of my website and so I lose the tracking ID of how they came.

    Does anyone know of a code that I can use to track people around my website once they are in so I keep the tracking ID they were given when they arrived? I'm pretty new to coding so please explain any answers step by step for the slow learner. ;) Ta.

    I will be so :celebrate to find a solution to this. I've been asking for around 6 months now.

  2. Kodo


    wow.. 6 months and no solution?
    well.. lucky day be yours..BAM!

    once they come to your site.. you most likely have a url that a referring ID in it.. you can use a bit of code to grab that referring id from what is called the "query string". Once you have that.. you just slap that into a cookie.. and bamo.. anytime you need to that ref id, you just request it from the cookie. All done..

    how you go about doing this (programming wise) depends on the platform you are using for your site..
  3. mezziG

    mezziG Private E-2

    Ok What is the query string and how do I get to it.

    I was given some cookie tracking code before but it did nothing so.....

    I'm using php files.

    next step please :)
  4. Kodo


  5. mezziG

    mezziG Private E-2

    Alright so I read the link. Not sure I fully understand so here goes.

    My need....

    Surfer clicks on my ad in google and gets taken to my landing page with an ID. When on that page he thinks my offer is good and clicks on the button provided to sign up. Where do I put the string in the button coding and will either of these work?

    $kid = $_GET["kid"];
    $keyword = $_GET["keyword"];
    $actual_keyword = $_GET["actual_keyword"];

    $kid = $_GET["kid"];

    Also. A surfer clicks on my ad in google, gets taken to my landing page with ID. In the menu sees another page that he thinks he'd like to check out and clicks on the menu button. where do I put the string so I can follow him from landing page to next visited page?

    :confused one wants to know. Please keep helping.

  6. mezziG

    mezziG Private E-2

    oh come on, this can't be too hard surely. ;) This is where I end with everyone else too. :foolish
  7. Kodo


    assuming $kid is your tracking id .. then you need to set a cookie or session variable with that value. Then from ANY page in your site, you just need to access the cookie or session and retrieve that value to store with your transactions.

    I can't help you with PHP.. I don't know the language well enough so I can only drop you conceptual info.

    So. Person 1 clicks on ad link on some other site..
    Person1 ends up on your site with a tracking id in the URL
    PHP page grabs trackingID from url
    PHP page puts value into session or cookie
    value is retrieved from session or cookie when needed.
  8. mezziG

    mezziG Private E-2

    Ok, so let's assume that the php is correct. How do I get the tracking code into the URL? (or is that just what happens from the code in the google ad?)

    What is the cookie coding that I need and where and how do I make it work? Coz I've been given help with that before and it hasn't helped me.

    mezz :guitar
  9. Kodo


    yeah, the tracking code is typically attached to the google ad and when they click on it, they end up on your site with that code in the querystring.

    Probably easier to store it in a session:

Share This Page

MajorGeeks.Com Menu

MajorGeeks.Com \ All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ NEW! PC Games \ System Tools \ Macintosh \ Demonews.Com \ Top Downloads

MajorGeeks.Com \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds