Discourse 广告插件 (Ads)

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

:warning: 广告拦截器 如果您在浏览器中或通过 VPN 运行广告拦截器,您的 /admin/plugins 页面内容可能会变为空白。禁用广告拦截器、使用隐身标签页或将您的网站加入白名单应可解决此问题。

功能

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

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

配置

设置自有广告 (House Ads)

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

首先创建您的广告。为每个广告赋予一个简短的描述性名称,并输入每个广告的 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 “标准区域”。不支持文本和 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: 由我们托管?此插件在我们的 Pro、Business 和 Enterprise 计划中可用。 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