I have set up revenue sharing on my site, but for some reason 100% of the time the adsense code of the user is being used although I have set it up for 50%.

Here are my settings:
profile.module:
Category: Google Adsense Client ID
Title: Google Adsense Client ID
Form name: profile_google_adsense_client_id
Explanation: Google Adsense Client ID
- Private field, content only available to privileged users: checked
- The user must enter a value: unchecked
- Visible in user registration form: checked

adsense.module, revenue sharing options:
- Enable Revenue Sharing: checked
- Percentage of node views going to author: 50
- Percentage of node views going to user who referred the author: Disabled (referral module not installed)

I would really appreciate some help.
I have reloaded the page several times in different browsers and I have cleared cookies in between, but every time I check the source code, the authors adsense id is being used. Mine never shows up.

Andre

Comments

kbahey’s picture

Did you use the "test mode" to see what ID is displayed?

If that does not help, and if you would trust strangers on the internet, and have ssh access, I can go in on your system and troubleshoot this.

kbahey’s picture

Status: Active » Closed (fixed)

I investigated this using SSH and the Drupal admin login.

It was not working because the cache was enabled in admin/settings.

There were two reasons:

1. One ad is hard coded in the theme, and is not using a dynamic block. So the client for that ad is always fixed, and not dynamic.

2. Since Drupal caches the entire page, the adsense code is also cached with the client Id as well. Turning the cache off solved this problem.

andre75’s picture

Thanks for the fix!!!!
So if I remove the hardcoded ads and run them through the module I can turn the cache back on?

Andre

kbahey’s picture

No.

Because there are two issues: one of them is that cache caches the entire page, including the ad code that was generated. So until the cache expires, the ad code will remain the same and will not rotate user client IDs. Then the cache refreshes, and the cycle continues.

I will add a note in the help about this.

andre75’s picture

Thanks. I guess if traffic keeps growing I will turn the cache on with a very short expiration time (just like drupal.org).