How to create adsense ads using only the users account id?
I have a website with articles and I want to share the adsense revenue of the articles with the article writers (in percentage of 90%). Iwe created a PHP code that rotates the ads, but I have a problem. I
we discovered that It`s not enough the account ID, i need a the ad slot number, too.
It would be much better if开发者_运维技巧 the user should send me only his account id, because else each user would need to create the ad in it`s own adsense account and send me the whole code and than I would need to check if the ad is the size I need.
Any suggestions ? Is it possible to rotate the ads only by the user id ?
You can use the old (but well working) AdSense code. It looks like this:
<script>
google_ad_client="YOUR-PUB-ID";
google_ad_width=300;
google_ad_height=250;
google_ad_format="300x250_as";
google_ad_type="image";
google_color_border="f3f3f3";
google_color_bg="f3f3f3";
google_color_link="313135";
google_color_text="626262";
google_color_url="2c89bc";
google_ui_features="rc:0";
</script>
<script src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
Available google_ad_type: 'text_image', 'text', 'image', for link units: omit this param.
Ad formats are: 728x90_as (Leaderboard), 468x60_as (Banner), 234x60_as (Half Banner), 125x125_as (Button), 120x600_as (Skyscraper), 160x600_as (Wide Skyscraper), 180x150_as (Small Rectangle), 120x240_as (Vertical Banner), 200x200_as (Small Square), 250x250_as (Square), 300x250_as (Rectangle), 336x280_as (Large Rectangle)
Link unit formats: 120x90_0ads_al (4 links), 120x90_0ads_al_s (5 links), 160x90_0ads_al (4 links), 160x90_0ads_al_s (5 links), 180x90_0ads_al (4 links), 180x90_0ads_al_s (5 links), 200x90_0ads_al (4 links), 200x90_0ads_al_s (5 links), 468x15_0ads_al (4 links), 468x15_0ads_al_s (5 links), 728x15_0ads_al (4 links), 728x15_0ads_al_s (5 links)
Just play around. The other values are self explanatory ... Width/height must match the selected ad format's width and height. That's how we do it on Pagewizz.com and Wizzley.com with some ten thousands of users.
精彩评论