Google Adsense multiple channel tracking

Google finally added multiple channel tracking this past Friday. I've complained about their poor tracking tools in the past, and this improvement doesn't answer all my gripes, but it's better than it was before.

Of course now I have to change my page generation code to actually implement these changes. Before multiple channels, you just would say

google_ad_channel = "8338221560";

or whatever. If that ad generated income, that income would be shown against that channel. So I'd have code that says something like:

$mych="8338221560" if $section eq "Linux";

$mych="3459225431" if $section eq "MacOSX";

..

google_ad_channel = "$mych";


But that's not enough. I want to know if the income came from a Linux page, yes, but I also want to know if it came from one of my articles or something written by someone else. And I want to know whether it was an ad at the top of the page or the bottom and so on. With only one ad channel, I could find out any of these things, but I had to choose one and only one.

Well, now I can use up to 5 channel tags. With the new setup, you have a format that specifies multiple channels:



google_ad_channel = "8338221560+2579359968+9929927590+5782134881+5000158698";

So my new code will probably look something like this:

@mych=();

push @mych,"8338221560" if $section eq "Linux";

push @mych,"3459225431" if $section eq "MacOSX";

..

google_ad_channel = "$mych[0]+$mych[1]+$mych[2]+$mych[3]+$mych[4]";


It's a bit irritating that we're limited to 5 channels, but realistically that's probably enough. I've started deploying this already, though I probably don't have it exactly as I want it. Of course you can see the ultimate effects by View Source on any page here.



Got something to add? Send me email.





(OLDER) <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Google Adsense multiple channel tracking




Increase ad revenue 50-250% with Ezoic


More Articles by

Find me on Google+

© Anthony Lawrence



Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us