Split Earnings

Discussion in 'AdSense' started by yawez.com, Feb 3, 2009.

  1. #1
    Hello, I was wondering how I can split my ad AdSense account earnings with my friends AdSense account? So, if I got an ad and put it on my website, I want 50% to go to my account and 50% to his account.

    Please help,
    Thank you.
     
    yawez.com, Feb 3, 2009 IP
  2. unomateo

    unomateo Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I run a free blog hosting and to split my google adsense with the blog owner, I wrote a php script that takes the server time, seconds only and then checks to see if it is odd or even. 0 - 60

    based on the time the page is loaded, if it is odd, my ads are displayed, if it is even the blog owner's ads are displayed.

    I thought about doing 1 for 1, but too much hassle and slows down the server doing the database update... Just checking the time works fine.

    Very simple and works great
     
    unomateo, Feb 3, 2009 IP
  3. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ohh yeah, haven't thought of that.. that's sounds great. I guess you can also do random numbers as well. Do you think you can share the code please?

    Thanks.
     
    yawez.com, Feb 4, 2009 IP
  4. dpsubi1

    dpsubi1 Notable Member

    Messages:
    9,318
    Likes Received:
    420
    Best Answers:
    0
    Trophy Points:
    280
    #4
    make sure no single page have two different andsense ids. (it is against Google TOS). if you both are using same id then you can use channels and keep two set of ads and rotate them while loading the page and use two different channels. However, some times the channels doesn't work well.

    if you are going to use two different ids, then you can easily share adsense revenue on any site using a simple banner ad rotation program.

    This link http://code.google.com/apis/adsense/revenuesharing.html may help too
     
    dpsubi1, Feb 4, 2009 IP
  5. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Really? You can't have two different id's on one page?
     
    yawez.com, Feb 4, 2009 IP
  6. dpsubi1

    dpsubi1 Notable Member

    Messages:
    9,318
    Likes Received:
    420
    Best Answers:
    0
    Trophy Points:
    280
    #6
    No. You should not have two different IDs in same page. Both Ids will get banned.

    EDIT: I am not able to find anything on Google TOS now. May be you can check with adsense support.
     
    dpsubi1, Feb 4, 2009 IP
  7. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Ok, I decided to use this code "<?php

    // random number 1 - 100
    $result_random=rand(1, 100);

    // if result less than or equal 50, display ad 1 (50%)
    if($result_random<=50){
    echo "My Ad";
    }


    // if result less than or equal 100, display ad 3 (50%)
    elseif($result_random<=100){
    echo "My Friends Ad";
    }

    ?>"

    You said that you can't have two different id's on one page. I am going to have 3 positioned ads on one page. For ad position one, I'm going to have it generate a random number, let's say 55 which will show My Friend's ad.. Now for ad position two, it's going to generate another random number, let's say 25, which will show My Ad. How is that going to work when you said you can't have two different id's on one page.

    Please help and thanks.
     
    yawez.com, Feb 4, 2009 IP
  8. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    yawez.com, Feb 4, 2009 IP
  9. rexborn

    rexborn Banned

    Messages:
    44
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    great info, maybe i'll try it
     
    rexborn, Feb 4, 2009 IP
  10. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    That code works, it's just that it can generate different numbers in different positions, so I don't know what to do. Please help.

     
    yawez.com, Feb 4, 2009 IP
  11. unomateo

    unomateo Peon

    Messages:
    41
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Hi,

    here is the code I use...

    first I run this at the beginning of the page. It is smart to only generate the flag once, instead of calling date('s') on every ad section in case the page loads slowly and causes different times.

    
    if((date('s')%2) == 0)
    $flag=false;
    else
    $flag=true;
    
    PHP:
    That will set my flag to true or false...

    
    if($flag) 
    {
    ?>
    put your ad code here
    <?
    }
    else
    {
    ?>
    Put you other ad code here
    <?
    }
    
    PHP:
    That's it, let me know if it helps... I would also like to hear from anyone that think it might violate TOS... I didn't look into the TOS for adsense.
     
    unomateo, Feb 4, 2009 IP
  12. yawez.com

    yawez.com Peon

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Hey thank you! It didn't work and it had syntax errors. So I fixed it to
    <?php if((date('s')%2) == 0)
    $flag=false;
    else
    $flag=true;
    ?>
    <?
    if($flag=false)
    {
    
    echo"put your ad code here";
    
    }
    else
    {
    
    echo"put yourrs other ad code here";
    
    }?>
    
    Code (markup):
    but now it just shows the "put yourrs other ad code here".
     
    yawez.com, Feb 5, 2009 IP
  13. dpsubi1

    dpsubi1 Notable Member

    Messages:
    9,318
    Likes Received:
    420
    Best Answers:
    0
    Trophy Points:
    280
    #13
    Contact google and get confirmation from them. as they are the one going to decide when they found more than one id found on your site. also post here what they say .. so others will also know about it.
     
    dpsubi1, Feb 5, 2009 IP