# # Google Adsense multiple channel tracking
APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Google Adsense multiple channel tracking

I've removed advertising from most of this site and will eventually clean up the few pages where it remains.

While not terribly expensive to maintain, this does cost me something. If I don't get enough donations to cover that expense, I will be shutting the site down in early 2020.

If you found something useful today, please consider a small donation.



Some material is very old and may be incorrect today

© October 2006 Anthony Lawrence

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.


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





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

Printer Friendly Version

->
-> Google Adsense multiple channel tracking


Inexpensive and informative Apple related e-books:

Take Control of the Mac Command Line with Terminal, Second Edition

Take Control of Numbers

Take Control of iCloud

iOS 10: A Take Control Crash Course

Photos for Mac: A Take Control Crash Course





More Articles by © Anthony Lawrence





Printer Friendly Version

Have you tried Searching this site?

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


Printer Friendly Version





FORTRAN's tragic fate has been its wide acceptance, mentally chaining thousands and thousands of programmers to our past mistakes. (Edsger W. Dijkstra)




Linux posts

Troubleshooting posts


This post tagged:

Advertising

Google

Web/HTML



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode