| 开发者 | sonill |
|---|---|
| 更新时间 | 2026年10月13日 16:41 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[amkit_ad_placement] shortcode, the amkit_ad_placement() template function, or do_action( 'amkit_ads_placement', 'placement-id' )[amkit_ad], [amkit_ad_group] and [amkit_ad_placement]
ad_impression and ad_click events to Google Analytics (gtag.js) or Google Tag Manager when either is already on your site
Developer Friendly
amkit_group_ads_query_args, amkit_server_side_device_filter and amkit_ad_rendered)sanil-ads-kit folder to /wp-content/plugins/.Yes. Use the AdSense ad type to paste your AdSense code directly. Admins with the unfiltered_html capability can enter raw script tags.
Yes. Create an Ad Group, add your ads to it, choose sequential or random rotation, and assign the group to a placement or shortcode.
Use the shortcode [amkit_ad id="123"] (or [amkit_ad_group id="4"] for a group) or insert a Sanil Ads Kit Gutenberg block in the post editor.
Yes. Each ad has a Targeting section where you can set conditions based on post type, specific pages, categories, tags, taxonomies, author, post format, page template, parent page, content age and archive type. The Show On field limits an ad to desktop or mobile visitors. Targeting by user role is not available.
Use the template function <?php amkit_ad_group( 'your-group-slug' ); ?> or <?php amkit_ad_placement( 'placement-id' ); ?> anywhere in your theme files.
No. The plugin is built for performance. On the front end it loads one small stylesheet (about 2 KB, under 1 KB compressed) and, only on pages that display an ad, a small analytics script (about 2 KB compressed). Neither needs jQuery; the popup/skip-ad stylesheet and script load only when you have created a popup or skip-ad placement. The heavier admin scripts load only on the plugin's own screens.
The All Ads list shows all-time views, clicks and CTR for every ad, and you can sort by any of them. Open an ad to see its detailed report (daily chart, countries, pages and peak click hours) in the Analytics box.
A view is counted when at least half of an ad is visible in the visitor's browser, at most once per ad per browser session. A click is counted each time a visitor clicks an ad's link. Counts are grouped by hour, ad, page and country.
Counting happens in the visitor's browser, so cached pages are still tracked. Page caches can serve a page after the security token embedded in it has expired (typically 12–24 hours); if you see tracking stop on heavily cached pages, shorten the cache lifetime.
No IP addresses, cookies or user identifiers are stored. See the Privacy section below.
Yes. You can use shortcodes in any page builder that supports shortcode widgets or text blocks.
Yes. Ads are output as plain HTML, so they work with caching plugins. Because targeting conditions and the desktop/mobile setting are evaluated when the page is built, a page cache will keep serving the version it first stored. If you use Show On (desktop/mobile) together with full-page caching, either vary the cache by device or return false from the amkit_server_side_device_filter filter so every ad is output and CSS hides the wrong one.
Step-by-step guides, tutorials and troubleshooting articles are at sanil.app/help/sanil-ads-kit.
Please open a thread in the WordPress.org support forum for this plugin. You can also reach out through sanil.app/support.
Enable the "Action on uninstall" option in plugin settings, then delete the plugin from the WordPress Plugins screen. This permanently removes all ads, ad groups, placements, analytics data and plugin settings. Cleanup only runs during WordPress uninstall flow. Manual folder deletion (FTP/file manager) does not trigger uninstall hooks.