Title: AdGhost Lite – Ad Insertion for Google Ad Manager
Author: adghost
Published: <strong>2026 年 10 月 11 日</strong>
Last modified: 2026 年 10 月 11 日

---

搜尋外掛

![](https://ps.w.org/adghost-lite/assets/icon.svg?rev=3739406)

# AdGhost Lite – Ad Insertion for Google Ad Manager

 由 [adghost](https://profiles.wordpress.org/adghost/) 開發

[下載](https://downloads.wordpress.org/plugin/adghost-lite.1.0.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/adghost-lite/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/adghost-lite/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/adghost-lite/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/adghost-lite/#developers)

 [技術支援](https://wordpress.org/support/plugin/adghost-lite/)

## 外掛說明

AdGhost Lite puts your Google Ad Manager (GAM) ad units on your WordPress site and
keeps them in good positions.

AdGhost Lite is complete on its own and free. An optional paid add-on, AdGhost Pro,
is sold separately.

 1. Enter your Google Ad Manager network code.
 2. Add your ad units, or import them from a GAM CSV.
 3. Click **Save and deploy**.

**Placement**

 * In-content ads placed by rule: after or before the paragraphs you name (2, 4,
   7, 9), every N paragraphs, before the last paragraph, or “Best spots”. They skip
   unsafe positions (inside tables, lists, quotes, columns, straight under a heading
   or image) and keep a minimum number of words between ads.
 * Header, footer, before and after content, before and after comments, between 
   posts in lists, sidebar (after widget N), and next to any HTML element by CSS
   selector.
 * AdGhost Ad block for the block editor, plus shortcode, widget and PHP function
   for manual placement.
 * Anchor bar, interstitial and rewarded ads using Google’s native formats.
 * Sticky and float-to-corner behaviours; corner pop-up, slide-in, docked and beside-
   content formats on the Pro plan.
 * AMP pages: every placement is served as an , and the anchor as AMP’s own sticky
   bar.
 * Works with block themes, classic themes, page builders and content in any language.

**Control**

 * Per unit: devices, page types, alignment, sizes, maximum insertions, auto refresh.
 * Key-values for Google Ad Manager: send each page’s post ID, page type, categories,
   tags and author, your own site-wide pairs, and pairs per unit, to target line
   items and break down reports.
 * Hide ads from logged-in writers or from every logged-in visitor, so your own 
   views and clicks never reach Google.
 * Pages without ads: privacy policy and contact pages are excluded by default, 
   and any page can be switched off from the editor or the Pages list.
 * Maximum ads per page, lazy loading, layout-shift prevention, ad label.
 * ads.txt editor and validator.
 * Preview mode that outlines every ad position for administrators.
 * Optional invalid traffic detection that can withhold ads from automated sessions.

**Fast and private**

The ad script is built into your site’s own uploads folder when you deploy, or you
can host it on your own server or CDN. The plugin sends no data to its author.

### Source code

Everything this plugin runs in the browser is built from human-readable source that
ships inside the plugin, in `ad-setup/`: the ad engine, its format modules and the
invalid-traffic detector. The files served to readers, in `cdn-free/`, are generated
from those sources in two steps, each checked to leave the program unchanged: comments
and indentation are removed, then local variable names are shortened. Both tools
are included in `ad-setup/tools/` (`strip.mjs` and `mangle.mjs`). No code is obfuscated.

### Third-party services

This plugin loads **Google Publisher Tag** (GPT), Google’s ad library, from `https://
securepubads.g.doubleclick.net/tag/js/gpt.js` on the front end of your site, so 
that the ad units you configure can request and display ads from your own Google
Ad Manager account. It is loaded only after you enter a network code and deploy,
and never on pages without ads. When it loads, the visitor’s browser connects to
Google, and Google receives what it needs to serve ads, such as the page address,
the ad unit codes and browser details.

 * Google terms of service: https://policies.google.com/terms
 * Google privacy policy: https://policies.google.com/privacy
 * How Google uses information from sites that use its services: https://policies.
   google.com/technologies/partner-sites

You are responsible for any consent your visitors’ jurisdiction requires before 
ads load, for example with a consent management platform.

The plugin makes no other requests to external services.

### Privacy

Invalid traffic detection is off until you switch it on (AdGhost  Settings  Invalid
traffic). When it is on, a first-party cookie named `adghost_sid` identifies the
browser session, and the visitor’s browser reports the names of the bot checks that
fired to your own site through the WordPress REST API. Your site works out the result
from them; nothing is sent anywhere else. The deeper device checks (graphics, fonts)
follow the visitor’s choice: they are skipped under Global Privacy Control, and 
where a consent platform is on the page they run only with consent. A visit found
to be a robot is remembered for the rest of that browser session (session storage,
key `agh_ivt`). When “Block ads for obvious bots” is chosen and a session shows 
a clear robot sign, a second cookie, `adghost_ivt`, tells the site’s pages to show
that browser no ads; it expires with the session. Verdict reports are limited per
visitor address; the address is only kept as a hash that changes daily.

## 適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

 *   AdGhost Ad

## 安裝方式

 1. Upload the plugin folder to `/wp-content/plugins/`, or install it from the Plugins
    screen.
 2. Activate **AdGhost Lite**.
 3. Open **AdGhost** in the admin menu.
 4. Enter your Google Ad Manager network code at the top of the page.
 5. Set up your ad units in the numbered tabs.
 6. Click **Save and deploy**.

## 常見問題集

### Where do I find my network code?

In Google Ad Manager under Admin  Global settings. It is a number such as 23048642157.

### How do I create ad units?

Create them in your Google Ad Manager account and enter the same ad unit codes in
AdGhost. **Export for GAM** writes a CSV you can use to create them, and **Import
from GAM** reads one.

### How do I stop ads on a page?

Privacy policy and contact pages have no ads by default (AdGhost  Settings  Where
ads show). For any other page, tick **Hide ads on this page** in the AdGhost box
in the editor, or use **Turn off** in the Ads column of the Pages or Posts list.

### How do I check where ads will appear?

Switch on **AdGhost Debug** in the admin bar, or Preview mode in Settings, and open
a post. Every ad position and every skipped paragraph is outlined with the reason.

### Is this an alternative to Ad Inserter?

Yes, if you serve ads through Google Ad Manager. The settings page uses the same
kind of positions (before/after paragraphs, posts, static pages), so it will feel
familiar. AdGhost then lazy-loads each GAM ad unit and reserves its space so the
page does not shift. It does not import Ad Inserter settings. AdGhost is not affiliated
with Ad Inserter or its authors.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈AdGhost Lite – Ad Insertion for Google Ad Manager〉的開發
相關工作。

參與者

 *   [ adghost ](https://profiles.wordpress.org/adghost/)

[將〈AdGhost Lite – Ad Insertion for Google Ad Manager〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/adghost-lite)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/adghost-lite/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/adghost-lite/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/adghost-lite/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/adghost-lite/)。

## 變更記錄

#### 1.0.0

 * First public release.

## 中繼資料

 *  版本 **1.0.0**
 *  最後更新 **5 天前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.3 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.1.3**
 *  PHP 版本需求 ** 8.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/adghost-lite/)
 * 標籤:
 * [ad inserter](https://tw.wordpress.org/plugins/tags/ad-inserter/)[ad manager](https://tw.wordpress.org/plugins/tags/ad-manager/)
   [ads](https://tw.wordpress.org/plugins/tags/ads/)[ads.txt](https://tw.wordpress.org/plugins/tags/ads-txt/)
   [amp](https://tw.wordpress.org/plugins/tags/amp/)
 *  [進階檢視](https://tw.wordpress.org/plugins/adghost-lite/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/adghost-lite/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/adghost-lite/reviews/)

## 參與者

 *   [ adghost ](https://profiles.wordpress.org/adghost/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/adghost-lite/)

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://theadghost.com)