Question for people who use the AdWords content network

danny

New member
Mar 10, 2007
298
4
0
New Jersey
I haven't done PPC in a while, but I remember in my tracking scripts I was able to take the referrer and parse out the actual URL of the page the ad appeared on. Can you still do that?

What I'm looking to do is write a script where I can track clicks, cost and earnings from each domain and set a threshold for acceptable ROI per domain. Basically, if after X clicks there are less than X conversions, trigger an API call to block that domain.

I had really good luck doing this manually for clients and I'd like to try it with affiliate programs. I just want to know if it's still a good idea. Of course it will do more, but I'm thinking content network monitoring will be what gives me the edge. I'll share with anyone who wants to help with information or help me test it out.
 


Code:
function get_ref($ref) {
	if(stristr($ref, "pagead/ads")) {
		$url = parse_url($ref);
		$vars = parse_query($url['query']);
		$ref = $vars['url'];
	} 
	return $ref;
}

Just pass $_SERVER['HTTP_REFERER'] to this.


[edit]
or you could just use prosper202
 
Yeah that's pretty much what I have, just going to also have to use the actual referer for premium publishers who don't have the iframe.