Close
Close

AdSense add Channel Name to Code

I was just making a new ad unit for one of my blogs and have noticed that when generating code for an ad unit in a channel that the channel code is no longer just a number but the name of the channel and the date you created it as well as a numerical code for the channel.

So the code now includes a line like this:

//2006-09-24: ProBlogger Main

I’m not sure why they’ve made this change. The previous numerical channel code is still in the code so they must have added it for some reason.

Unless there’s some pretty good reason for it I’m not sure I would want the code there as I know serious AdSense publishers do at times look at the source code in each others pages and I know some publishers use channel names that can be quite revealing about their AdSense strategy.

About Darren Rowse

Darren Rowse is the founder and editor of ProBlogger Blog Tips and Digital Photography School. Learn more about him here and connect with him on Twitter, Facebook, Google+ and LinkedIn.

Problogger.net runs on the Genesis Framework

Genesis Framework

The Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple - start using Genesis now!

Comments

  1. Because that’s a comment, rather than actual code, you should have no problem with removing it.

  2. But if you remove it, aren’t you technically violating the terms/policies set forth by Google that you cannot edit their code?

  3. CypherHackz says:

    yea. i just found it awhile ago. maybe it is another way adsense team helping publishers to know what is the channel for the asd.

    Minor updates in AdSense code [CypherHackz.Net]

  4. Ken Cheung says:

    When you’r copying and pasting several Adsense scripts at a time, it’s easy to accidently copy the same channel twice. With the commented channel name, you can see that you copied the wrong channel in your script. Without it, all you see is a number and it’s easy to not notice you copied the same channel twice. I’ve done that a couple of times and didn’t realize it until later. By then, the stats are messed up.

  5. It’s so you can trace back to the channel name from a given web page’s HTML. Before, unless you manually built a cross reference table between each channel id and channel name, you had no way easy way to know what channel(s) a page was using when looking at your web page’s HTML. You would literally have to generate ad code for every channel you had active, just to figure out the channel name the channel belonged to. This made the following tasks arduous and inconvenient:

    - tracking down an improperly assigned channel
    - renaming one or more channels or changing your usage of existing channels and subsequently identifying all pages that used the old channels for update purposes

    Robert

  6. steven says:

    thanx for all this good tips!