Saturday, January 9, 2010

Adsense and Dynamic content

If you want to put adsense on your php dynamic pages, it's possible
Let me explain how GET|POST matters. The process of getting the relevant ad to the page is as following:
1. The user inputs some query and hits Search.
2. The browser sends the request and gets the page with some contents
3. The AdSense javascript on this page calls spider telling him the URL of the page
4. The spider comes, grabs the page and analyzes it thus selecting the relevant ads
Now what will happen if the JS tells the spider the URL like http://www.mysite.com/myscript.cgi? The spider will see a page with default content because it didn't POST a request there. But the user will see quite different page because he did! So ads displayed will correspond with contents of default page, not with what the user has requested. And if the request was sent by user via GET then the JS will pass the spuider the URL like http://www.mysite.com/myscript.cgi?q...ss+destruction, so both user and spider will see the same content and the spider will be able to select the appropriate ads to display.

credit

No comments: