I am not really sure if this is a bug, but here it is.
-----------------------------------------------

I am trying really hard to figure out why I never see any google ads on my main page of my website (most other pages work).

The main page is basically a list of the three recent blogs created using the views module. I have enable section targeting for better relationship between ads and the content, which I understand will insert adsense start/end tags in the code. There should be plenty of words in the blogs to trigger ads. I also check that there are no 'stop words' in my blogs that adsense might consider to forbid. I just looked at the source code for the main page and found that there is no text between the two ad_sense start/end tags:

---

<div class="content clear-block">

    <p>Det skulle simpelthen bare prøves det her, at udvikle en hjemmeside med det mål at skabe rammerne for udveksling af erfaringer og ideer indenfor alle aspekter af lystfiskeri. Ideen er at opbygge viden om grej, metoder, pladser, journaler og meget andet, skabt af og for lystfiskere. De forskellige typer af viden er indbyrdes relateret til hinanden, hvilket giver mulighed for en helt ny form for interaktiv oplevelse af informationer. F.eks.</p>

<!-- google_ad_section_start --><!-- google_ad_section_end -->  </div>

<div class="clear-block">

---

Should the text of the blog not be between the two tags?
Also, could this be the reason that I do not see any ads on my main page?
Ou maybe it is just a simple user error? ... :-)

I am using the drupal 6.10 together with adsense module 6.x-1.0.

Sorry, I also posted this to http://drupal.org/node/404890

Comments

jcnventura’s picture

Status: Active » Postponed (maintainer needs more info)

The start/end tags are placed just before/after the node content with a weight of -1 and 1 respectively. It seems views is not placing your content with weight 0 as would be expected for the main content.

Try editing the adsense_nodeapi() function in adsense.module to see if you can figure out some better weights for your case. Start with -2 and work your way to -100 with -5, -10, -20 increments, until you find one that works for you.

Let us know if there's one that works.

João

drupalhorn’s picture

YES!

After changing weights to -5 and 5 in the function, I got the following in the source code:

<div class="content clear-block">
<!-- google_ad_section_start --><p>Det skulle simpelthen bare prøves det her, at udvikle en hjemmeside med det mål at skabe rammerne for udveksling af erfaringer og ideer indenfor alle aspekter af lystfiskeri. Ideen er at opbygge viden om grej, metoder, pladser, journaler og meget andet, skabt af og for lystfiskere. De forskellige typer af viden er indbyrdes relateret til hinanden, hvilket giver mulighed for en helt ny form for interaktiv oplevelse af informationer. F.eks.</p>
<!-- google_ad_section_end --></div>

So now the tags are on both sides of the blog text. However, I still do not see any ads but maybe that is just a matter of waiting for the crawler to come back to my site again. What do you think?

Thanks for the response ... :-)

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks also for the feedback.

-5 and 5 seem to be sensible enough that maybe the module should be changed to use those values.

As to the ad changes, yes I think that you'll need to wait some time (days, weeks or even one month) before that type of changes can be felt, as you've rightly said you'll need to wait for the Adsense crawler to return to your site.

I am setting the status to active to make sure that this change is applied to the source in the short term.

João

jcnventura’s picture

Status: Active » Fixed

Just committed some code that fixes this. It should be available in the latest dev in a few hours.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.