1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to Put PHP Keyword Tracking on Your LP

Discussion in 'Affiliate Programs' started by webgenesis, Mar 30, 2008.

  1. #1
    Okay, so a few people have PM'ed me how to track keywords on their AzoogleAds sub Id's using PHP and instead of responding too those people in separate messages, I'll just make a thread.

    This is very important for you to do, so that you know what converts and makes you money... and know what sucks and well, sucks all your money away from you.

    If someone else has other code to add, feel free.

    Now I know I'm probably giving away a little bit too much info, but hey... I'm feeling charitable today :) :


    ---------------------

    The URL in your AD (Google), that you send visitors to should look like this:

    - or -


    The URL in your AD (Yahoo)


    - Remember, the page you send them to must be a .PHP -- it can't be a .HTM or .HTML


    Your LANDING PAGE (Google) code at the top of your Landing page should look like:

    - or -



    Your LANDING PAGE (Yahoo) should look like:




    If You Send Customers to the Merchant Page straight from a link on your LP your links should look like:


    If You Send Customers to a Jump Page from your Landing Page

    Let's say you send your customer to a jump page (like www.yourwebsite.com/jump.php) from your LP. Here is what the link on your LP should look like:



    Your Jump Page Code

    On your page at www.yourwebsite.com/jump.php, this is what the top of the page should look like:


    Hope this helps somebody... God bless!
     
    webgenesis, Mar 30, 2008 IP
  2. rajuthan

    rajuthan Well-Known Member

    Messages:
    899
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Thanks a lot rep added
     
    rajuthan, Mar 30, 2008 IP
  3. bryanw

    bryanw Peon

    Messages:
    197
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for the great info!

    Rep added.
     
    bryanw, Mar 30, 2008 IP
  4. rose8

    rose8 Guest

    Messages:
    198
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Just implemented I'm hoping it works!!

    Thanks :)
     
    rose8, Mar 30, 2008 IP
  5. Renegadez

    Renegadez Peon

    Messages:
    244
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You are a genius!

    Thanks man =].

    I will bookmark this and hope to use it in the future when I get into this kinda stuff. :)

    regards,
    ReN^
     
    Renegadez, Mar 30, 2008 IP
  6. aj22

    aj22 Peon

    Messages:
    643
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You the man, wg. +rep for helping the newbies.
     
    aj22, Mar 30, 2008 IP
  7. acemenace

    acemenace Active Member

    Messages:
    114
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #7
    Thanks. rep added
     
    acemenace, Mar 30, 2008 IP
  8. pood

    pood Active Member

    Messages:
    212
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #8
    you'll probably want to encrypt those keywords.

    ppl may want to try out tracking202 since it's free or adwatch (30 day trial).
     
    pood, Mar 30, 2008 IP
  9. coolnikin

    coolnikin Well-Known Member

    Messages:
    384
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    125
    #9
    adwatch ? can u point to url
     
    coolnikin, Mar 30, 2008 IP
  10. webgenesis

    webgenesis Peon

    Messages:
    340
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Thanks all for the love and rep everybody :)



    One note about using Tracking202 (free software)... it will encrypt your words from your AM, but on the other hand, you will be giving out ALL your keywords (which are unencrypted) to the owners of Tracking202.

    Maybe this is why it's free.... ;)

    But anyways do a search online for 'keyword tracking' on Google and you'll find something good.

    The link to Tracking is www.tracking202.com -- I couldn't find the link to Adwatch though...
     
    webgenesis, Mar 31, 2008 IP
  11. Bm1125

    Bm1125 Member

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #11
    i love u webgenesis.

    lol great job
     
    Bm1125, Mar 31, 2008 IP
  12. jill_domains

    jill_domains Peon

    Messages:
    219
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Great job webgenesis!
     
    jill_domains, Mar 31, 2008 IP
  13. KGL

    KGL Peon

    Messages:
    1,155
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #13
    You better believe it!
     
    KGL, Mar 31, 2008 IP
  14. cashflowmommy

    cashflowmommy Guest

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Great stuff!

    What's the best way to encrypt the keywords, WebGenesis? I totally agree that tracking 202 is a joke and surprised so many are trying it. Yeaaahhhh, go ahead and send me all your campaign info and I'll track everything for you.

    Does using the "jump" page effectively erase the keywords and stop them from reaching the affiliate networks?

    Thanks again for your help.
     
    cashflowmommy, Apr 1, 2008 IP
  15. web_dev

    web_dev Peon

    Messages:
    230
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #15
    This should be common knowledge for all PPC affiliates, even if you don't know anything about programming.

    This sure beats begging your AM to put your tracking code on merchants page.

    For content network you can grab the "referring site" your visitor came from using predefined PHP $_SERVER array.

    <?php
    echo getenv("HTTP_REFERER");
    ?>

    OR

    <?php
    echo $_SERVER['HTTP_REFERER'];
    ?>

    more documentation here http://ca3.php.net/reserved.variables
     
    web_dev, Apr 1, 2008 IP
  16. webgenesis

    webgenesis Peon

    Messages:
    340
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Yeah, you guys can send me all ur keywords too and I'll track them :)

    Using the jump page does NOT erase the keywords... or keep them from reaching the affiliate networks. All it does is:

    1) help with ur Quality Score so that Google doesn't see an affiliate link (ex. c.zamp) on ur Landing Page....
    2) Make it easy for u to change ur affiliate link in 1 location, rather than having to manually go into each page and change ALL the links.

    Some people use databases and assign special codes to certain keywords as to cloak them.

    Somebody else who does that and is reading this thread can write up a reply on here and explain in simple terms how they do that.



    Nice code Web_Dev... I can definitely use that for my content LP's :D
     
    webgenesis, Apr 1, 2008 IP
  17. rose8

    rose8 Guest

    Messages:
    198
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Followed it verbatim and it's not tracking.

    Is it a big deal if instead of my destination URL being: http://www.website.com/page/index.php it is instead: http://www.website.com/page ?

    That's the only issue I can see, because everything else is exactly as pictured but nothing is tracking.

    Thanks a lot for any help.
     
    rose8, Apr 1, 2008 IP
  18. web_dev

    web_dev Peon

    Messages:
    230
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #18

    Sure np! Mind you "HTTP_REFERER" can be unreliable sometimes. It depends on the user's browser. But by default, the browsers are set to pick up this value and $_SERVER["HTTP_REFERER"] basically references it.

    By default, $_SERVER["HTTP_REFERER"] will give you the entire url string.
    like http://www.blahblah.com/blah/blah/blah/?id=213123213

    but if you like to grab just the domian name, you run a preg_match on it with the following regular expression.

    <?php

    preg_match("/((http:\/\/|https:\/\/)(www\.)?(.*)\.[a-z]{3,4})/", $_SERVER["HTTP_REFERER"], $match);

    echo $match[1];

    ?>

    *this is not test. i quickly write this.
     
    web_dev, Apr 1, 2008 IP
  19. rose8

    rose8 Guest

    Messages:
    198
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #19
    How much do you charge for programming web_dev? lol
     
    rose8, Apr 1, 2008 IP
  20. xboxundone

    xboxundone Well-Known Member

    Messages:
    1,903
    Likes Received:
    33
    Best Answers:
    0
    Trophy Points:
    103
    #20
    this will help any news out there looking to do this.
     
    xboxundone, Apr 1, 2008 IP