# Discourse 广告插件 (Ads)

**URL:** <https://meta.discourse.org/t/discourse-advertising-plugin-ads/33734>\
**Category:** Plugin\
**Tags:** official, advertising, included-in-core\
**Created:** [2015 年9 月 25 日 05:21 UTC](https://meta.discourse.org/t/discourse-advertising-plugin-ads/33734 "2015-09-25T05:21:36Z")\
**Posts on this page:** 1\
**Showing post:** 405

<div class="post-metadata">

作者： ![Juan\_David\_Martínez](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/juan_david_mart%C3%ADnez/32/307484_2.png) [@Juan\_David\_Martínez](https://meta.discourse.org/u/Juan_David_Mart%C3%ADnez)\
发布日期： [2026 年10 月 12 日 14:21 UTC](https://meta.discourse.org/t/discourse-advertising-plugin-ads/33734/405 "2026-10-12T14:21:56Z")

</div>

嗨 @ljpp，

抱歉回复晚了。要让 AdSense 正常工作，你需要同时设置以下两项（命名确实容易让人混淆）：

- `adsense_nth_post_code` — 这不是广告单元代码，而是间隔设置：即每几篇帖子之间插入一次广告（设为 3 = 每第 3 篇帖子后插入一次广告）。
- `adsense_post_bottom_code` — 帖子之间广告位对应的实际 AdSense 单元编号，另外还需要在 `adsense_post_bottom_ad_sizes` 中设置尺寸（移动端：`adsense_mobile_post_bottom_code` + `adsense_mobile_post_bottom_ad_size`）。

只有填写了 `adsense_publisher_code`（你的发布商 ID）后，这些设置才会生效——这是启用 AdSense 的关键设置。

如果没有任何广告显示：请检查当前浏览用户是否属于 `adsense_exclude_groups` 中的组（默认情况下，工作人员/管理员会被排除在外）。

如果你还有其他问题，请随时告诉我。

---

_[View the full topic](https://meta.discourse.org/t/discourse-advertising-plugin-ads/33734)._
