Hi.
Is there any plugin to use Yandex Ad (https://partner2.yandex.ru) banners with Discourse (with auto disabling for trust users)?
Perhaps there is another way? The ads code doesn’t work (
你是怎么做到的?能分享一下吗?
- 我使用了 https://github.com/discourse/discourse-adplugin。您需要创建自己的广告。
您需要添加类似以下的 Yandex 代码:
<!- Yandex.RTB R-A-******-* -> <div id="yandex_rtb_R-A-******-*"></div>
- 然后将 Yandex 的完整代码添加到
<body>中。
- 在“内容安全策略脚本源”中添加代码
https://mc.yandex.ru/metrika/tag.js。
不幸的是,Yandex 的广告仅在刷新页面(Ctrl + F5)后才会显示。如果您能解决此问题,请分享解决方案。

