# Yandex 广告网络插件

**URL:** <https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860>\
**Category:** Support\
**Tags:** advertising\
**Created:** [2019年二月22日 20:40 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860 "2019-02-22T20:40:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fedor\_Ponomarev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fedor_ponomarev/32/129582_2.png) [@Fedor\_Ponomarev](https://meta.discourse.org/u/Fedor_Ponomarev)\
**Post date:** [2019年二月22日 20:40 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/1 "2019-02-22T20:40:23Z")

</div>

Hi.  
Is there any plugin to use Yandex Ad ([https://partner2.yandex.ru](https://partner2.yandex.ru)) banners with Discourse (with auto disabling for trust users)?

---

<div class="post-metadata">

**Author:** ![Amigo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amigo/32/138488_2.png) [@Amigo](https://meta.discourse.org/u/Amigo)\
**Post date:** [2019年十月9日 10:26 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/2 "2019-10-09T10:26:58Z")

</div>

或许还有别的办法？广告代码无法工作（

---

<div class="post-metadata">

**Author:** ![gmm.su](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gmm.su/32/196683_2.png) [@gmm.su](https://meta.discourse.org/u/gmm.su)\
**Post date:** [2020年十月10日 15:35 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/3 "2020-10-10T15:35:48Z")

</div>

我成功添加了 Yandex 的广告。但广告只有在刷新页面（Ctrl + F5）后才会显示，不会自动出现 ☹

 ![23](https://global.discourse-cdn.com/meta/original/3X/5/1/512093a3b273a3508b8b75e586a6a7b3376786ce.jpeg)

---

<div class="post-metadata">

**Author:** ![ufukayyildiz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ufukayyildiz/32/217157_2.png) [@ufukayyildiz](https://meta.discourse.org/u/ufukayyildiz)\
**Post date:** [2020年十月10日 22:49 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/4 "2020-10-10T22:49:47Z")

</div>

你是怎么做到的？能分享一下吗？

---

<div class="post-metadata">

**Author:** ![gmm.su](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gmm.su/32/196683_2.png) [@gmm.su](https://meta.discourse.org/u/gmm.su)\
**Post date:** [2020年十月11日 10:59 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/5 "2020-10-11T10:59:14Z")

</div>

1. 我使用了 [https://github.com/discourse/discourse-adplugin。您需要创建自己的广告。](https://github.com/discourse/discourse-adplugin%E3%80%82%E6%82%A8%E9%9C%80%E8%A6%81%E5%88%9B%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%B9%BF%E5%91%8A%E3%80%82)  
您需要添加类似以下的 Yandex 代码：

`<!- Yandex.RTB R-A- ******-* -> <div id="yandex_rtb_R-A-****** -*"></div>`

1. 然后将 Yandex 的完整代码添加到 `<body>` 中。

 ![234](https://global.discourse-cdn.com/meta/original/3X/1/8/18b98c7b2c8ebf54047828488a2dae74ea0c9521.jpeg)

1. 在“内容安全策略脚本源”中添加代码 `https://mc.yandex.ru/metrika/tag.js`。

不幸的是，Yandex 的广告仅在刷新页面（Ctrl + F5）后才会显示。如果您能解决此问题，请分享解决方案。

---

<div class="post-metadata">

**Author:** ![R2BB1T](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/r2bb1t/32/333470_2.png) [@R2BB1T](https://meta.discourse.org/u/R2BB1T)\
**Post date:** [2023年十月16日 13:16 UTC](https://meta.discourse.org/t/plugin-for-yandex-ad-network/109860/6 "2023-10-16T13:16:08Z")

</div>

> [@gmm.su](#):
>
> [GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum](https://github.com/discourse/discourse-adplugin)

安装错误 [GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum](https://github.com/discourse/discourse-adplugin)
