I've seen some other threads about AdSense revenue sharing, but seems there's no modules that do this yet. I have a website and I want the users to be able to enter their AdSense publisher ID so that on their blog pages a % of the time the Ads will be under their ID. I don't know PHP much, just enough to get by on tweaking things, but I'm not sure how this would be done.

I know there's hacks out there to do this in vBulletin and such. Can anyone help me out?

Comments

varunvnair’s picture

Quick and Dirty Solution:

  1. Enable the profile module.
  2. Create a profile field called "AdSense publisher ID".
  3. Hack your templates so that the post author's pubished ID is dynamically inserted in the JavaScript snippet for the ad.

Depending on your needs you can make the custom profile field mandatory (so that every author has to fill in something) or default to your own publisher ID (so that if an author does not want revenue from her posts the revenue comes to you) or not show an add at all (Authors who do not want to earn do not have ads with their posts).

My Drupal-powered Blog: ThoughtfulChaos

tonkeht33’s picture

Yeah, this I can do, but it's just so... dirty! I guess nobody has done this and wants to show how? :P

varunvnair’s picture

Read this post titled HOW TO: Create Intelligent Blog Ads at Performancing.com. Scroll down to the middle of the page and read the section titled "Set the channel".

The author uses the post author's name as the channel for an ad. This is basically a variation off what I suggested (Each menthod has a few advantages and disadvantages).

Also consider that retrieving the value for a specific profile field is easy. Just use $author->profile_fieldname. Of course you will have to populate $author beforehand and also take care of special conditions (mentioned in my earlier post).

You will have to stick in the AdSense snippet somewhere. It will be either in the templates or as a block in the sidebar. Dynamically adding in an identifier either in the channel or Publisher ID does not add much to task.

Please note that I don't know anything about the Google AdSense module works... maybe it allows more options or better ways of doing all the stuff outlined above. Do let us know how you eventually managed what you are trying to do.

My Drupal-powered Blog: ThoughtfulChaos

thaiaa’s picture

100% Google AdSense Revenue Sharing Bookmark

http://www.dofollowdigg.com

http://www.adsensedigg.com

Your Post , Your Data , Your Ads , Your Monay

Enjoy.

noid’s picture

The google adsense module has adsense tags which your users can use.

focus1355’s picture

pleaze i dont understand

noid’s picture

My bad. I was thinking of channels (as used in the tags) not unique publisher ID's. Sorry.

focus1355’s picture

phpBB is best .

robertdouglass’s picture

- Robert Douglass

-----
My sites: HornRoller.com, RobsHouse.net

kbahey’s picture

I have been asked to incorporate this in my adsense module more than once.

I raised questions on this, but did not get a satisfying answer:

1. Is it allowed by Google terms of service?
2. Is it worth risking your account being terminated?

See here for details http://drupal.org/node/30875

If Google allows it, we can discuss how to best implement it in a automated way (e.g. profile field with Google client ID on your nodes, ...etc.), but not before that ...
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

tonkeht33’s picture

According to Google, this is not against their TOS. There is a website that already does something like this and a handful of people have emailed Google, their response has been that it is fine. The only problem would be that you cannot have more than one Publisher ID on any given page, so if you had more than one AdSense block per page, you would need them to all be from the same user.

So for now, this is in accordance to the TOS. I would love it if you would implement this into your Adsense module, since I am using that now. If I can help in any way...

dkruglyak’s picture

We need an official reference to this Google's OK.

The problem is not just with the hosting site that swaps AdSense IDs. The users who submit their IDs may have revenue at stake elsewhere and need to be re-assured.

kbahey’s picture

It seems I have a sponsor who is willing to fund this for inclusion in the Adsense module.

Will know for sure in the next few days.

Stay tuned.
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

kbahey’s picture

This is now a standard feature for Adsense on 4.6.

Enjoy ...
--
Drupal development and customization: 2bits.com
Personal: Baheyeldin.com

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

kbrune’s picture

This additional feature has definitely got me thinking about the potential of sharing revenue with active members who frequently contribute.

Some additional questions arise however...

  • Not all users have AdSense IDs. To get one you not only have to have a website, but also be approved by Google.
  • Would potentail authors that want to sign up reference the URL of the site hosting their articles?
  • What is Google's position on multiple people trying to sign up via the same URL?
  • I don't want to be restricted to ALL the ads on a page being directed to one AdSense ID. For example I also have AdSense Search on every page, and that is currently not supported by the AdSense module so I've just got the Google code pasted into my theme. If my understanding is correct, if I want to start using revenue sharing this will need to change.