PDA

View Full Version : AdSense and dynamic pages


RoySpencer
01-12-2003, 11:18/11:18AM
We've run into a problem...AdSense can't do content-targeted ads on dynamically generated pages. We need to regenerate 45,000 pages every 12 hours with new content, and can now do this dynamically, but we're told we need to make static versions to allow targeted ads.

So, is there a way to have a static .htm page that calls a cgi script (maybe with just a single line) and returns a dynamically generated page? What would such a cgi call look like in the static html page? Or is there another solution?

polarmate
01-12-2003, 11:26/11:26AM
Not my experience. I have the same asp script generating hundreds of pages and the ads are pretty well targeted.

I have also seen targeted ads on forums based on the topic of the thread.

Do you have confirmation from Google that they can't do AdSense on dynamic pages? (Which would be weird cos then one wonders what the spider took home when it indexed the dynamic page.)

RoySpencer
01-12-2003, 11:29/11:29AM
Polarmate:
the following is from adsense-tech@google.com:

"Since our crawler indexes content by URL, it is not optimized to serve ads on pages that are dynamically created. If the URL is unique for every user, similar to a session ID for example, every time a different user views a page it will not be in the index and will be queued to be crawled. This means that pages seen by the users are never in the index, and they will see public service ads instead. You may continue testing your ads on dynamic pages, but may continue to receive mixed results. I would encourage you to place the ads on static pages for the best results."

RoySpencer
01-12-2003, 11:44/11:44AM
Polarmate: It sounds like your dynamically generated pages have a static .htm name...that's what WE want to do! Maybe what I'm asking is, how do you invoke a cgi script from within a static page?

Webmaster T
01-12-2003, 12:11/12:11PM
Do you have sessionID's in your url? Does Googlebot index your pages. If so I don't see what the problem is. If you have sessionID's than the word on the street is Googlebot won't index your regular pages either.

You can have static "looking" pages a few ways depending on the type of server they are hosted on. .asp or aspx for NT and SHTML for unix. Both use SSI or page embedded parameters.

polarmate
01-12-2003, 12:18/12:18PM
Roy, all the pages I referred to earlier are of the format:
something.asp?param=9999

I don't see any problems with the ads. :confused:

RoySpencer
01-12-2003, 12:26/12:26PM
OK, maybe this is what we want, and it seems to work:

I put the following single line in a (static) .htm file:

<META http-equiv="refresh" content="0;URL=http://www.videoweather.com/cgi-bin/test3.pl.cgi">

which just redirects to a dynamically generated page (but from a static .htm page, which I assume AdSense would then see as a static URL)

AndrewB
01-12-2003, 21:29/09:29PM
But upon refresh to the dynamic page doesn't it load the adsense javascript again? This may show different ads to the static page before the refresh

RoySpencer
02-12-2003, 18:47/06:47PM
OK, it turns out that what we want to do is easy...a single line in a .htm file...that is a server side "include virtual" that points to a cgi script (with query string). We just didn't know that this is how you can make a static version of a dynamically generated page, which is what we've been trying to do all along.

NovaW
20-12-2003, 05:04/05:04AM
It seems that the adsense bot will crawl dynamic pages - so long as the URL is not too long. Adsense will treat each variation in the query as a new page and then crawl it.

The best way to create your static pages is to use mod_rewrite on apache, or ISAPI_rewrite dll on IIS - to create url's like this

www.yoursite.com/123.htm

instead of www.yoursite.com?id=123

you don't have to change the dynamic page - just any internal links so they use the new scheme. mod_rewrite will just convert the SE friendly URL to the dynamic one internally.

ie - as many static pages as you want - without adding any new pages.

Yixe
20-12-2003, 10:55/10:55AM
Originally posted by NovaW
It seems that the adsense bot will crawl dynamic pages - so long as the URL is not too long. Adsense will treat each variation in the query as a new page and then crawl it.

The best way to create your static pages is to use mod_rewrite on apache, or ISAPI_rewrite dll on IIS - to create url's like this

www.yoursite.com/123.htm

instead of www.yoursite.com?id=123

you don't have to change the dynamic page - just any internal links so they use the new scheme. mod_rewrite will just convert the SE friendly URL to the dynamic one internally.

ie - as many static pages as you want - without adding any new pages.

This does seem to be the simplest and most effective way to do this - if you can use mod_rewrite.

Webmaster T
20-12-2003, 13:22/01:22PM
Originally posted by NovaW
The best way to create your static pages is to use mod_rewrite on apache, or ISAPI_rewrite dll on IIS "Best" is subjective, IMO, anything you do that adds server load should be the method of last resort because with time, and if the site becomes really successful this starts to affect scaling and load speed. I've been studying this for years and came to the conclusion that page embedded SQL programming had advantages over using rewrites or dll's because they have no extra server load, are easily changed and edited and have no scaling issues beyond the expected database issues. Page building is simple you just write another program that writes the static pages with the embedded parameters.

I wrote an article on dynamic urls (http://www.tsworldofdesign.com/blog/arty.asp?arty=5) a while back that has some code and examples.

NovaW
21-12-2003, 02:35/02:35AM
that isn't true - studying it for years or not. There is nothing much subjective about speed.

page embedded sql commands are interpreted - involve lots of back and forth traffic (if using php/mysql - not true if using stored procedures with MSSQL)

a routine coded into the server itself is always going to be orders of magnitude faster. There is no question of that.

If you need to create static pages from dynamic pages - use a server routine to do it.