tags:

views:

193

answers:

5

Hello,

My site is using PHP to pull content from a database. I am running a Google Adsense ad alongside this content.

The first time I pull data from the database, Adsense doesn't appear to recognize the subject of the content and displays a very generic, unrelated ad.

Any ideas on how I can get Adsense to recognize the subject of the content?

Thanks,

John

+2  A: 

Give it more time.

Adsense can not in any way tell the difference between PHP-generated and static content. There may be an issue in the generated HTML, but it sounds unlikely - my guess would be that Adsense either needs more time to spider your site and get some good general keywords to use, or that it can't identify/has relatively few ads to offer on the subject of the content.

Matchu
Here's what's weird: the lame non-relevant ad only displays when I first pull data from the database. When I move on to other functions of my site, Adsense shows a lot of relevant ads. The thing is, I really want my users to see a relevant ad during that first pull from the database.
of course it can tell if it is PHP generated. Watch the headers of a pure HTML url vs PHP url. Anyway, the part on the "you have to wait" is the answer.
Itay Moav
Fine, rephrase: I'm pretty darn sure Adsense doesn't detect if it's PHP generated, even if it theoretically could.
Matchu
+1  A: 

It takes a while for adsense to classify your page, you'll probably get public service ads and the like for a while until it does. I wouldn't worry about it, give it a couple of days.

karim79
I sure hope so. It keeps showing the same ad when I make the initial pull from the database. But when I use another function of my site, the ads are already pretty relevant. But I want them to be relevant right after the initial pull.
I remember when I first incorporated it I was getting 'Donate money for Hurricane Catrina Relief etc...' for about a week. They *will not* be relevant instantly.
karim79
I must've signed up around that same time too as every page had those Katrina PSAs. In any case just be patient, it will take some time for the google to get a sense of what your site is about.
cOle2
You'll know it's working when the Hurricane Katrina ads get replaced with Evony Ads.
Rafe Lavelle
+1  A: 

You've already solved all of your programming issues if you can see the ads. There's nothing left to do except wait for Google to do its magic.

If you're using a PHP/MySQL based CMS Google will be able to find your stuff just fine.

John at CashCommons
+2  A: 

Remember that in order for Google to provide relevant adverts, it has to be able to retrieve a copy of the page, analyse it, and determine which ads would be appropriate.

All Google has access to is the URL. If the user has to submit a form to get to a page (which it sounds like is what you are doing), and the form information is POSTed to the server, then it only has the script name, for example:

http://www.example.com/mypage.php

Consider changing the submitted parameters to be passed in the query string, as then Google will be able to request the same page and perform the analysis. e.g.

http://www.example.com/mypage.php?f1=abc&f2=def

Jon Grant
+1  A: 

The cycle works like this:

  1. A user requests a page adsense has never been used on before (e.g. /mynewpage.html)
  2. Adsense isn't familiar with the URL, so it returns a placeholder ad, and queues the page to be crawled
  3. Generally, within minutes of the user requesting the page, the adsense crawler requests the page itself (you can see this in your access logs) and analyzes it
  4. At some point, adsense starts returning appropriate advertising for the page in question

It's not an instantaneous process. There is no way for adsense to instantly return "relevant" ads for pages it's never heard of before.

Frank Farmer