Discourse 广告插件(Ads)

:discourse2: 摘要 Discourse Advertising 允许在 Discourse 上设置广告
:open_book: 安装指南 此插件已捆绑在 Discourse 核心中。无需单独安装该插件。

:warning: 广告拦截器 如果您在浏览器或通过 VPN 运行广告拦截器,您的 /admin/plugins 页面内容可能会被清空。禁用广告拦截器、使用无痕标签页或将您的站点列入白名单应能防止此问题。

功能

这是官方支持的 Discourse 广告插件。安装并配置它以开始在您的 Discourse 论坛上投放广告。

该插件支持以下广告平台:

配置

设置自有广告 (House Ads)

如果您不想使用外部广告平台,但希望展示自己的广告,那么自有广告适合您!通过转到 Discourse 论坛的管理部分,然后进入插件部分来定义您的广告。在左侧,您应该会看到一个名为“自有广告”的链接。

首先创建您的广告。为每个广告赋予简短的描述性名称,并输入每个广告的 HTML。使用自定义主题(管理 > 自定义 > 主题)对它们进行样式设置。最后,点击自有广告 UI 中的“设置”按钮,并选择要在每个广告位中展示哪些广告。一旦将广告添加到广告位,它们就会开始展示。

为您的广告平台配置广告

  • 导航到 Discourse 论坛的管理部分。
  • 单击“设置”,左侧垂直导航栏应会出现。
  • 选择您的广告平台。
    • 自有广告 (House Ads) - 如果您希望从 Discourse 实例创建和投放广告。
    • Adsense - 如果使用 Adsense 作为广告平台。
    • DFP - 如果使用 DoubleClick for Publishers 广告平台。
    • Carbon Ads - 如果使用 Carbon Ads 广告平台。
    • AdButler - 如果使用 AdButler 广告平台。
输入您的详细信息
  1. 添加您的发布者 ID - 您的发布者 ID 可以从您的广告平台获取,也可以在您的广告标签中找到(见下图)。
  2. 从下拉框中选择您的信任级别。这将仅向具有特定信任级别的用户显示广告。有关信任级别的更多详细信息,请参阅 插件功能 标题。
  3. 从您的广告平台获取广告标签 - 请参阅下图以了解标签的外观。
  4. 将广告代码的一部分添加到 Discourse 的网站设置中,以指定广告出现的位置。请参阅您广告平台的图片,了解广告标签的哪一部分应该放在哪里。有关广告出现位置的更多详细信息
  5. 选择您的广告尺寸 - 这与您放入广告提供商以创建广告的尺寸相同。前往 插件功能 标题以查看支持广告尺寸的列表。
将 Adsense 广告标签添加到 Discourse 的网站设置

首先,将您的 ads.txt 文件 的内容添加到 Discourse 的 ads txt 网站设置中。然后将以下值复制到 Discourse 设置中:

将 DoubleClick for Publishers 广告标签添加到 Discourse 的网站设置

将 Amazon Affiliates 广告标签添加到 Discourse 的网站设置

仅适用于产品链接和横幅广告。

将 Carbon Ads 脚本标签添加到 Discourse 的网站设置

将 AdButler 广告区域 URL 添加到 Discourse 的网站设置

:warning: 此插件仅支持 AdButler “标准区域 (Standard Zones)”。不支持文本和 VAST。

如果您浏览到 AdButler 管理中的某个区域,您可以在浏览器地址栏的 URL 中找到发布者 ID (PPPPPP) 和区域 ID (ZZZZZZ):

https://admin.adbutler.com/?ID=PPPPPP&p=textadzone.view&zoneID=ZZZZZZ

在 管理 > 设置 > AdButler 中配置广告。在 “adbutler publisher id” 设置中输入发布者 ID,并根据需要在不同的区域 ID 设置中输入区域 ID。

默认情况下,广告假定为 728 x 90 大小,或在移动视图中为 320 x 50。要使用不同尺寸的广告,请使用站点主题中的 CSS 进行自定义。覆盖以下 CSS:

.adbutler-ad { width: 728px; height: 90px; } .adbutler-mobile-ad { width: 320px; height: 50px; }

查看您的广告

配置好设置且您的广告平台已准备好投放广告后,导航到您输入位置的页面,您应该能看到广告。

插件功能

可用的广告展示位置

以下是可用的位置,以及描述和显示其在 Discourse 中位置的图片,用于所有平台的广告展示。

位置名称 描述
主题列表顶部 广告将出现在 Discourse 首页的页眉
帖子流上方的主题 广告将出现在所有 Discourse 论坛主题的页眉
建议主题上方的主题 广告将出现在所有 Discourse 论坛主题的建议主题下方的页脚
帖子底部 & 第 N 个帖子 广告将出现在主题中指定的第 N 个帖子中。因此,如果您在一个主题中有 5 个帖子,并且希望广告在第 2 个帖子后显示,请在 ad_platform_nth_post_code 中输入 2。

信任级别

您可以使用 ad_platform_through_trust_level 下拉菜单来禁用高于特定信任级别用户的广告。作为指南,选择:

  • 0 向未登录的用户显示广告。
  • 1 向未登录的用户以及新用户和基本用户显示广告。
  • 2 也向成员显示广告,但不向常客和领导者显示。
  • 3 向所有人显示广告,但不向领导者显示。
  • 4 向所有人(包括领导者)显示广告。

要了解有关 Discourse 中信任级别的更多信息,请参阅 Discourse 关于信任级别的帖子

私信

默认情况下,私信中不会显示广告。要在私信中启用广告,请使用“私信不显示广告”设置。

群组

要为用户提供免广告体验,请将用户放入群组,并将这些群组添加到“群组不显示广告”设置中。

请注意,群组设置中的 可见性 至少需要设置为 群组所有者、成员、版主,以确保属于该组的用户可以看到该组的存在。如果群组的 可见性 更严格,则“群组不显示广告”设置将被忽略,该组的成员将看到广告。

分类

要禁用某些分类中的广告,请将它们添加到“分类不显示广告”设置中。还可以考虑使用“受限分类不显示广告”来禁用所有具有读取访问限制的分类中的广告。

标签

可以使用标签禁用单个主题的广告,并在“标签不显示广告”设置中输入这些标签。如果某些主题违反广告网络政策,这将非常有用。

:discourse2: 由我们托管?此插件在我们的标准版、商业版和企业版计划中均可用。Advertising | Discourse - Civilized Discussion

79 个赞
How to ad banners?
Run custom ads?
House Ad Templates
Using Adsense plugin for banners
Customization in Discourse
How to insert ads after topic content?
Monetized forum
AdSense plugin comparison
AdSense Code Missing on my Forum
Add CSP sources to the plugin
How to add ads on side?
How to inject HTML code in the head only on home and post pages
Take a break! Theme component
Blank/Empty ads on Discourse Adsense Adplugin
Advertising plugin alternatives for Discourse
How to put an add every 2 posts?
Speak with the Discourse product team about advertising
Your own banner with a link
Issue with Adsense and pageviews
I want to add adsense code in <head> for activet adsence account
How to add ads on side?
Using scripts in House Ads Plugin
MMORPG forum project, I would like to hear your thoughts
Discourse needs better search
Discourse Advertising Plugin 【Mobile display bugs】
Pyx's Modern Theme
Inaccurate plugin availability notes on meta
Bundling more popular plugins with Discourse core
Increasing DFP ad size on mobile
Code Fund Ad Customization?
How to add small banner ads to a forum!
Ads need a lot of space on topics with nested replies
Adverts on the Discourse hosted Starter plan
Any Thoughts on Supporting BSA or Alternative Advertising?
Upgrading Ember to 2.10
Is there anybody being able to profit from a website based on discourse
Using a plug-in to monetize my Discourse
Make #plugin "wiki by default"
Question about the extent of data tracking / pseudo-AI
Adsense ad crawler errors
<div> tags in posts / Ezoic integration
Almost ready to launch
How to prevent Ads Plugin from Displaying Ads on the forum homepage
Ad butler show ads Nth place between posts
Cookie compliance under GDPR
How to force users to disable ad blocker?
Donation Bar for House Ad
Affiliate link functions - rewrite
Is it possible to space out the ads in the topic?
Email Hostname Certificate Mismatch Causing sidekiq Queue Overload, Severe Site Instability
Set up a staging server
Members of hidden groups in no_ads_for_groups still see ads
Versatile Banner
Forum maintenance cost
A strange question about google ad display in my site
How to insert ads after topic content?
Versatile banner rotation to display multiple ads in the same position?
I want to insert images (banner) between the topic answers. How do I start?
Add social media handles on home page