Testing your ad targeting by changing the URL

It seems the aside in yesterday's posting about the AdSense case study has generated some unexpected excitement. To recap, this is what I said:

About developing your pages in a separate folder: one benefit to this approach is that you can place ads on your pages right away. If the ads aren't well-targeted, you can use section targeting and some careful rewriting to massage the page content to show the right ads. After the rewriting, you simply rename the folder and load up the pages in the browser again, causing the AdSense crawlers to come revisit the page (since the page URL is now different). You can do this as many times as you want until the targeting is just right, and then you move all the files to the root of the site.

As Pedro Timoteo points out, this tip is easy to do with normal websites, but not with blogs. The reason is that the blogging software tends to dictate the form and structure of the URLs used by the blog postings. But even there, there's a trick you can use to check your ad targeting before the blog posting goes live. This trick also works with regular sites.

To understand the trick, you have to go back to AdSense first principles. As I describe it in my one-page AdSense summary:

The first time a page is loaded after the code is placed on it, Google sends out its crawlers to fetch a copy of the page for analysis. Sophisticated algorithms (described in the AdSense patent) determine the general topic of the page and what keywords are associated with that topic. [Emphasis added]

So how does Google know when a page is loaded for the first time? Simple: it tracks the URL of the page. Every time the AdSense code on a page is run by the browser, the URL of the page (as seen by the browser) gets sent back to the Google's ad servers. If the ad servers have never seen the page, they schedule it to be crawled and in the meantime serve up some more generic ads based on what AdSense already knows about the site. The crawling happens quickly, though, usually within seconds, and well-targeted ads get served almost immediately because of that.

The problem, though, is that you can't actually force a page to be re-crawled except for the first time. It will definitely be recrawled at some point, but it may be days before that happens. If you've made mistakes in your content that cause the wrong ads to show up, your fixes for those mistakes won't immediately affect the ads that are displayed.

This is why the “test folders” trick works: you keep changing the URLs of the pages and so they get recrawled right away because Google doesn't know that they're really the same pages. (Of course, you want to delete those test pages when you're done and you certainly don't want to have external links coming in to them. This technique is strictly for ad targeting.)

Here's the trick: any change to the URL will cause a recrawl. In other words, if I access a page using this URL:

http://www.ericgiguere.com/page.html

Then simply adding a query parameter to the URL causes a recrawl:

http://www.ericgiguere.com/page.html?a=1

After all, many dynamic sites user query parameters to return different content, so Google can't consider two pages with different query parameters (but the same base URL) to be the same.

Note that when I say “recrawl” in this case, it doesn't mean that the ads on the original URL will be updated. The URLs are considered separate, even if the pages are actually identical.

So the way to use this trick for testing ad targeting in blogs and regular websites is as follows:

  1. Create the page/posting, but do not view the page/posting with your browser.
  2. Manually enter the URL of your new page/posting into your browser's address bar, but don't load the page yet.
  3. Add a random query parameter to the URL. If the URL has no query parameters in it to begin with, just append something like “?a=1″ to it. If there are already query parameters, append something like “&a=1″ instead (use an ampersand instead of a question mark — only the first query parameter in a URL is preceded by a question mark). Make sure that the name of the query parameter is not a keyword (it will skew the ad results) and use a number as the parameter value.
  4. Now view the page with the altered URL. Wait a few seconds and then refresh it again with the same altered URL. You'll see the ads.
  5. If the ads are mistargeted, update the page/posting content appropriately and repeat the viewing step after updating the query parameter value. In other words, change it from “?a=0″ to “?a=1″. This makes the URL look new and forces AdSense to recrawl the page.
  6. Repeat steps 4 and 5 as necessary.
  7. When the targeting seems good, drop the query parameter you added and refresh the page/posting using its normal URL.

It's a pretty simple process that just requires a bit of manual intervention. I'm sure someone out there could come up with a WordPress plugin that automates the testing. (Not me, I don't use WordPress.)

This is extra work, mind you, and it's probably not necessary for most people. In general I find AdSense's targeting to be right on and if there are any issues I'm usually OK to let things stay mistargeted for a few days. But it's up to you to decide what's right for your site…

Eric Giguere is the AdSense expert who wrote Make Easy Money with Google. Subscribe to his AdSense newsletter for more tips and advice on AdSense and content monetization.

Socialize This Post (Please!)

Add to OnlywireAdd to Onlywire

Tags

Comments

Comments are closed.

Subscribe without commenting