Discourse 广告插件(Ads)

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

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

功能

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

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

配置

设置站内广告

如果您不想使用外部广告平台,但希望展示您自己的广告,那么站内广告非常适合您!定义广告的方法是进入 Discourse 论坛的管理员部分,然后进入插件部分。在左侧,您应该能看到一个名为“站内广告”的链接。

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

为您的广告平台配置广告

  • 导航至 Discourse 论坛的管理员部分。
  • 点击“设置”,左侧应出现垂直导航栏。
  • 选择您的广告平台。
    • 站内广告 - 如果您希望从 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: 由我们托管?此插件可在我们的标准、商务和企业计划中使用。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
How to add ads on side?
How to inject HTML code in the head only on home and post pages
Add CSP sources to the plugin
Code Fund Ad Customization?
Advertising plugin alternatives for Discourse
Blank/Empty ads on Discourse Adsense Adplugin
Take a break! Theme component
Your own banner with a link
Issue with Adsense and pageviews
I want to add adsense code in <head> for activet adsence account
Increasing DFP ad size on mobile
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
Adsense Google
Inaccurate plugin availability notes on meta
Bundling more popular plugins with Discourse core
Adverts on the Discourse hosted Starter plan
How to add ads on side?
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
How to put an add every 2 posts?
Speak with the Discourse product team about advertising