Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 22-03-04
Registered User
 
Join Date: Aug 2003
Location: Wirral
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
watcher is an unknown quantity at this point
  Tracking PPC Search Phrases

TD has the neat keyword report that lets you see the keywords that are converting for PPC campaigns.

I want to do a similar thing with other networks that don't have keyword tracking so it looks like I will have to set something up manually.

By extracting the search phrase frm the referring engine and passing this through the "click reference" parameter of the tracking URL (available on most networks under different names) I will be able to see which search phrases are converting.

The question I have is - in PHP what is the best way to get a hold of the search phrase from a referring search engine (primarily Google Adwords) ?

Thanks.

Keith.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 23-03-04
ianm's Avatar
Avoiding real work
 
Join Date: Aug 2003
Location: Buckinghamshire
Posts: 1,382
Thanks: 0
Thanked 0 Times in 0 Posts
ianm is an unknown quantity at this point
PHP Code:
getenv('HTTP_REFERER'
Will return the URL of the site that referred the visitor to you.

You'll then need to parse the URL that you get from it to firstly work out if its a search engine (and if so which one) and then to extract the keywords from the URL.
__________________
Those who can do, those who can't talk about it
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 23-03-04
Registered User
 
Join Date: Aug 2003
Location: Wirral
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
watcher is an unknown quantity at this point
Thanks for that ianm.

For a referral from Google Adwords does anyone know the format of the query string ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 23-03-04
Registered User
 
Join Date: Aug 2003
Location: Wirral
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
watcher is an unknown quantity at this point
It's OK I've answered my own question !

I thought that a referral from Adwords was of a different format to a referral from normal SERPs - it isn't.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 23-03-04
Super Moderator
 
Join Date: Aug 2003
Posts: 2,451
Thanks: 0
Thanked 0 Times in 0 Posts
Rich is an unknown quantity at this point
Here is some code I use as part of a script to highlight search terms on pages
PHP Code:
$from_serp=false;
$engines = array (
    array (
'google\.''p|q''Google'),
    array (
'yahoo\.''p|q''Yahoo'),
    array (
'search\.aol\.co','query','AOL'),
    array (
'search\.dogpile\.com','q','Dogpile')

);
while ((list(, 
$engine) = each ($engines)) && $from_serp==false) {
    
$regex="/http:\/\/[^\/]*".$engine[0].".*[?&](".$engine[1].")=([^?&]*)[?&]?/";
    if (
preg_match($regex,$_SERVER['HTTP_REFERER'],$serp_matches)) {
        
$from_serp=true;
        
$serp_source=$engine[2];
        
$serp_search=$serp_matches[2];
    }

If you put that at the top of your redirect script it will extract the search engine used ($serp_source) and the query used ($serp_search). You can use those to create your tracking ID. $from_serp will be false if it doesn't recognise the seach engine.

The array at the top contains an array for each search engine. The first value is something unique about the domain name to recognise that search engine - this is used in a regular expression, so full-stops need to be escaped to \.
The second value is a list of url parameter names that may contain the search query - | is the regular expression 'or' character; e.g. google normally uses q, but sometimes uses p.
The third value is just the name of this engine, which the $serp_source variable will be set to.

Using this format makes it a bit simpler to add or modify search engine details.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 23-03-04
Registered User
 
Join Date: Aug 2003
Location: Wirral
Posts: 760
Thanks: 0
Thanked 0 Times in 0 Posts
watcher is an unknown quantity at this point
Nice code fragment Rich,

Thanks.

Added:

Shouldn't that code fragment be put in the Affiliate University - it is very useful.

Last edited by watcher; 23-03-04 at 03:16 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 23-03-04
Super Moderator
 
Join Date: Aug 2003
Posts: 2,451
Thanks: 0
Thanked 0 Times in 0 Posts
Rich is an unknown quantity at this point
I just checked back and that code was my own work, so anyones free to use it as they wish. I created it to supply query terms to this php highligher script.

Last edited by Rich; 23-03-04 at 03:39 PM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
My Keyword Research - Care to contribute to the research? webdesignhq Search Engine Strategies 4 26-03-07 09:52 AM
Merchants - What do you really think of us affiliates when..... BigB The Affiliate Marketing Lounge 28 24-08-04 10:12 AM
MSN announced a redesign for its MSN Search service getvisible The Affiliate Marketing Lounge 0 25-03-04 10:41 PM
PPC saved the Search engines zaq Pay Per Click Search Engines 1 01-02-04 08:50 PM
ARELIS 3 Link Popularity Software Qui Gon Jinn Website Promotion 4 05-03-03 07:34 AM


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7