Google Adsense revenue sharing

denel003 - December 21, 2005 - 07:03

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?

Profile field for AdSense publisher ID and some template hacking

varunvnair - December 21, 2005 - 09:56

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

Yeah, this I can do, but

denel003 - December 21, 2005 - 15:58

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

Isn't all that dirty

varunvnair - December 21, 2005 - 16:24

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

The google adsense module

noid - December 21, 2005 - 11:55

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

i dont inderstand

focus1355 - December 21, 2005 - 12:02

pleaze i dont understand

My bad. I was thinking of

noid - December 21, 2005 - 16:50

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

phpBB

focus1355 - December 21, 2005 - 12:00

phpBB is best .

Very helpful trolling

robertDouglass - December 21, 2005 - 17:03

- Robert Douglass

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

Adsense module

kbahey - December 21, 2005 - 18:19

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

Not against TOS

denel003 - December 21, 2005 - 18:36

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...

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

dkruglyak - January 4, 2006 - 23:34

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.

Progress

kbahey - December 28, 2005 - 06:23

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

This is now a feature

kbahey - January 5, 2006 - 17:03

This is now a standard feature for Adsense on 4.6.

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

AdSense Account Challenges

kbrune - February 17, 2006 - 22:47

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.
 
 

Drupal is a registered trademark of Dries Buytaert.