如何仅使用用户帐户 ID 创建 AdSense 广告?

发布于 2024-12-07 07:27:50 字数 249 浏览 1 评论 0原文

我有一个包含文章的网站,我想与文章作者分享文章的 AdSense 收入(比例为 90%)。我我们创建了一个用于轮播广告的 PHP 代码,但我遇到了问题。我发现光有帐户 ID 还不够,我还需要广告位编号。

如果用户只向我发送他的帐户 ID,那就更好了,因为否则每个用户都需要在其自己的 AdSense 帐户中创建广告并向我发送整个代码,而不是我需要检查广告是否是我需要的尺寸。

有什么建议吗?是否可以仅通过用户 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. Iwe 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 ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只有一腔孤勇 2024-12-14 07:27:50

您可以使用旧的(但运行良好)AdSense 代码。它看起来像这样:

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

可用的 google_ad_type:
'文字_图像',
'文本',
'图像',
对于链接单元:省略此参数。

广告格式有:
728x90_as(排行榜),
468x60_as(横幅),
234x60_as(半横幅),
125x125_as(按钮),
120x600_as(摩天大楼),
160x600_as(宽阔的摩天大楼),
180x150_as(小矩形),
120x240_as(垂直横幅),
200x200_as(小方块),
250x250_as(方形),
300x250_as(矩形),
336x280_as(大矩形)

链接单元格式:
120x90_0ads_al(4 个链接),
120x90_0ads_al_s(5 个链接),
160x90_0ads_al(4 个链接),
160x90_0ads_al_s(5 个链接),
180x90_0ads_al(4 个链接),
180x90_0ads_al_s(5 个链接),
200x90_0ads_al(4 个链接),
200x90_0ads_al_s(5 个链接),
468x15_0ads_al(4 个链接),
468x15_0ads_al_s(5 个链接),
728x15_0ads_al(4 个链接),
728x15_0ads_al_s(5 个链接)

随便玩玩。其他值是不言自明的...宽度/高度必须与所选广告格式的宽度和高度匹配。我们在拥有数万名用户的 Pagewizz.com 和 Wizzley.com 上就是这样做的。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文