Linux 软件免费装
Banner图

PYH Ads

开发者 planyourhost
更新时间 2026年10月3日 04:47
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

adsense advertising analytics ads ad manager

下载

1.0.0

详情介绍:

PYH Ads lets you create, target, display and measure advertisements from your WordPress dashboard, with no separate ad platform and no external service. It is built around three connected systems:
  1. Ad management: what should be displayed?
  2. Targeting and placement: where and when should it be displayed?
  3. Analytics: how is it performing?
Ad types Ad management Targeting Placements Header, below header, homepage hero, before content, after the first paragraph, middle of content, before the final paragraph, after content, sidebar and footer. You can also place an ad manually with the [pyh_ads id="123"] shortcode, the PYH Ad block, the PYH Ads widget, or template tags. Rotation When several ads compete for one placement, choose highest priority, weighted random, even rotation, random, or best CTR. Analytics Performance and privacy For developers

安装:

  1. Upload the pyh-ads folder to /wp-content/plugins/, or install the plugin from Plugins → Add New.
  2. Activate the plugin.
  3. Go to PYH Ads → Add New, create an ad, choose its placements and set its status to Active.

屏幕截图:

  • All Ads list with status, placements, impressions, clicks and CTR.
  • Ad editor with type, placements, targeting rules, schedule and device preview.
  • Settings for rotation, in-content placements, tracking and privacy.
  • Placements overview with per-placement performance and manual placement options.
  • Analytics with impressions, clicks and CTR charts plus placement, device and campaign breakdowns.
  • Tools for CSV export, clearing analytics data and deleting all plugin data.

升级注意事项:

1.0.0 Initial release.

常见问题:

Can I paste JavaScript or my own ad-network code?

No. Custom HTML ads are sanitised with wp_kses(): scripts, iframes and forms are removed when you save and when the ad is displayed. For Google AdSense, enter your publisher ID and ad slot ID and the plugin creates the ad unit. Managing ads requires the manage_options capability, which you can change with the pyh_ads_capability filter.

Does it work with caching plugins?

Yes. Ads are rendered on the server and tracked by a small script that reports to a REST endpoint, so cached pages are still counted. With full-page caching, which ad wins a placement is decided when the page is cached.

Can AdSense clicks be tracked?

No. AdSense renders inside a cross-origin iframe, so browsers do not let the page see clicks. Impressions are tracked; use your AdSense reports for clicks. The same applies to embedded YouTube and Vimeo players.

Why does the header placement not show in my theme?

Header and homepage hero use the standard wp_body_open hook. If your theme does not call wp_body_open(), use the shortcode or do_action( 'pyh_ads_placement', 'header' ) in your template.

How do I show an ad in a theme template?

Use <?php pyh_ads_display( 123 ); ?> for a specific ad, or <?php do_action( 'pyh_ads_placement', 'sidebar' ); ?> for whichever ad wins that placement.

Do targeting rules apply to shortcodes and blocks?

No. Targeting applies to automatic placements. An ad inserted with a shortcode, block or widget-by-ID appears where you put it, as long as it is active and within its schedule.

How do I remove all data?

Use PYH Ads → Tools → Delete All PYH Ads Data, or tick "Delete all ads, analytics and settings when the plugin is deleted" under PYH Ads → Settings. Data is kept by default when you delete the plugin.

更新日志:

1.0.0