John
John

Reputation:

Adsense doesn't seem to recognize PHP-generated content

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

Upvotes: 2

Views: 547

Answers (5)

Frank Farmer
Frank Farmer

Reputation: 39386

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.

Upvotes: 1

Jon Grant
Jon Grant

Reputation: 11520

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

Upvotes: 2

John
John

Reputation: 16007

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.

Upvotes: 1

karim79
karim79

Reputation: 342765

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.

Upvotes: 1

Matchu
Matchu

Reputation: 85862

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.

Upvotes: 2

Related Questions