Title: AdGhost Lite – Ad Inserter for Google Ad Manager
Author: adghost
Published: <strong>11 oktober 2026</strong>
Last modified: 24 oktober 2026

---

Sök tillägg

![](https://ps.w.org/adghost-lite/assets/banner-772x250.png?rev=3763620)

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

# AdGhost Lite – Ad Inserter for Google Ad Manager

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

[Ladda ner](https://downloads.wordpress.org/plugin/adghost-lite.1.2.0.zip)

 * [Detaljer](https://sv.wordpress.org/plugins/adghost-lite/#description)
 * [Recensioner](https://sv.wordpress.org/plugins/adghost-lite/#reviews)
 *  [Installation](https://sv.wordpress.org/plugins/adghost-lite/#installation)
 * [Utveckling](https://sv.wordpress.org/plugins/adghost-lite/#developers)

 [Support](https://wordpress.org/support/plugin/adghost-lite/)

## Beskrivning

AdGhost Lite is an ad inserter for Google Ad Manager (GAM): it puts your ad units
on your WordPress site and keeps them in good positions.

There is no code to write or paste. AdGhost adds Google’s ad tag (GPT) and every
ad slot to your pages itself: you only enter your network code and ad unit codes,
the numbers and names from Google Ad Manager.

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.
 * Quick settings beside your ad units: Preview mode, ad style, who is shown no 
   ads, and bot protection, with links to every other setting.
 * Optional invalid traffic detection that can withhold ads from automated sessions.

**Switching, consent and site code**

 * Import from Ad Inserter and Advanced Ads: the Google Ad Manager units you placed
   with either plugin come over with their positions (paragraphs, before and after
   content, HTML elements), devices and page types. The other plugin’s settings 
   are left as they are.
 * Consent banner for GDPR: a guide to Google’s own certified consent message (Ad
   Manager  Privacy & messaging), a check that shows which consent platform answers
   on your site, and a ”Privacy settings” link (footer or shortcode) that lets visitors
   change their choice.
 * Header and footer code: add analytics, site verification or a consent platform’s
   tag to every page, in the head, after the body opens, or before it closes.
 * Export and import settings: copy a setup to another site or a staging copy, or
   keep a backup before big changes.

**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 Google’s consent message (Ad Manager  Privacy & messaging)
or another consent management platform. The ”Privacy settings” link only calls Google’s
consent message when it is already on the page; it loads nothing itself.

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.

Header and footer code is printed on your pages exactly as you enter it; what it
does is up to the code you add. The consent check (Check on my site) runs only in
an administrator’s own browser and stores nothing. The import from Ad Inserter and
Advanced Ads reads their settings on your own site and sends nothing anywhere.

## Block

Detta tillägg tillhandahåller 1 block.

 *   AdGhost Ad

## Installation

 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**.

## Vanliga frågor

### Do I need to write or paste any code?

No. AdGhost adds Google’s ad tag (GPT) and every ad slot to your pages itself. You
type in your network code and ad unit codes, or import them from a GAM CSV, Ad Inserter
or Advanced Ads, then click **Save and deploy**. Header and footer code is only 
there if you want to add something of your own, such as analytics.

### Where do I find my network code?

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

### I only use Google AdSense. Can I use AdGhost Lite?

AdGhost Lite places Google Ad Manager ad units, so it needs an Ad Manager account.
Ad Manager is free for most publishers: sign up at admanager.google.com with the
Google account that runs your AdSense, and link AdSense there so it keeps competing
to fill your ads. If you would rather not run Ad Manager yourself, AdGhost can manage
it for you: see theadghost.com/gam-ads-inserter.

### 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. AdGhost is not affiliated with Ad Inserter or its authors.

### Can I import my Ad Inserter or Advanced Ads setup?

Yes. When either plugin has left settings on your site, AdGhost  Ad units shows 
an **Import from** button (the other plugin does not need to be active). It reads
the Google Ad Manager slots in your blocks or ads, including slots defined once 
in the header code, and adds them as units with their positions. Nothing changes
until you click **Save and deploy**. AdSense, image ads, PHP blocks and groups are
not imported: each is listed with the reason. Other tags found in the header or 
footer code (analytics, a consent platform) can be copied into AdGhost’s own header
and footer code.

### Does AdGhost show a GDPR consent banner?

AdGhost helps you use Google’s own consent message instead. Google requires a Google-
certified consent platform for personalised ads in the EEA, the UK and Switzerland;
its message in Ad Manager  Privacy & messaging is certified and free, and Google
shows it with your ads. AdGhost  Settings  Consent & ad blockers has the steps, 
a **Check on my site** link, and an optional ”Privacy settings” link in the footer
that reopens the message. You can also place that link with the shortcode `[adghost_privacy_settings]`.
Another consent platform works too: add its tag in Header code.

## Recensioner

Detta tillägg har inga recensioner.

## Bidragsgivare och utvecklare

”AdGhost Lite – Ad Inserter for Google Ad Manager” är programvara med öppen källkod.
Följande personer har bidragit till detta tillägg.

Bidragande personer

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

[Översätt ”AdGhost Lite – Ad Inserter for Google Ad Manager” till ditt språk.](https://translate.wordpress.org/projects/wp-plugins/adghost-lite)

### Intresserad av programutveckling?

[Läs programkoden](https://plugins.trac.wordpress.org/browser/adghost-lite/), kika
på [SVN-filförvaret](https://plugins.svn.wordpress.org/adghost-lite/) eller prenumerera
på [utvecklarloggen](https://plugins.trac.wordpress.org/log/adghost-lite/) via [RSS](https://plugins.trac.wordpress.org/log/adghost-lite/?limit=100&mode=stop_on_copy&format=rss).

## Ändringslogg

#### 1.2.0

**New features**

 * Quick settings beside your ad units: switch Preview mode on or off at once, pick
   an ad style (Fewer, Balanced, More), choose who is shown no ads, and set bot 
   protection. Links go straight to the consent message, pages without ads, auto
   refresh, the ad label, the ad blocker message, header and footer code, and the
   setup tour.
 * Export and import settings (Settings  Advanced  Move settings): a file with the
   network code, ad units and every setting, to copy a setup to another site. What
   belongs to one site stays: the deploy state, the built ad script, traffic counts,
   lists of post IDs and ads.txt. Header and footer code is imported only for users
   allowed to add scripts, and nothing goes live until you click **Save and deploy**.

**UI improvements**

 * The setup tour links to what to do without a Google Ad Manager account, including
   when you only use AdSense.
 * Two weeks after your ads first go live, a single request for a review on WordPress.
   org. ”Not now” asks again later; ”Don’t ask again” ends it.
 * Readme: a FAQ for AdSense users and a plainer description of how no code is needed.

#### 1.1.0

**New features**

 * Import from Ad Inserter and Advanced Ads: the Google Ad Manager units placed 
   with either plugin come over with their positions, devices and page types, including
   slots defined once in the header code. Blocks that are not GAM units (AdSense,
   images, PHP, groups) are listed with the reason. The other plugin’s settings 
   are never changed.
 * Consent helper for Google’s certified consent message (Ad Manager  Privacy & 
   messaging): setup steps, a check that shows which consent platform answers on
   your site, and a ”Privacy settings” link for the footer or the `[adghost_privacy_settings]`
   shortcode, so visitors can change their choice.
 * Header and footer code: add analytics, site verification or a consent platform’s
   tag in the head, after the body opens, or before it closes. Only users allowed
   to post raw HTML can save it.

**UI improvements**

 * New name: AdGhost Lite – Ad Inserter for Google Ad Manager.
 * Ad label settings: colour, bold and alignment sit together in one row, and hide
   when the label is hidden.
 * Key-values: the values sent to Google Ad Manager are shown as a table, with a
   heading for each column.
 * Imported units say where they came from (Ad Inserter, Advanced Ads or a CSV),
   and imported GAM units are marked as already in Google Ad Manager, so Export 
   for GAM leaves them out.
 * An ”Import from” button appears on the Ad units screen only when another ad plugin
   has left settings on the site.

**Bug fixes**

 * The Consent settings told you to add your consent platform in Header code, a 
   setting that did not exist. It does now, under Settings  Advanced.

#### 1.0.0

 * First public release.

## Meta

 *  Version **1.2.0**
 *  Senast uppdaterat **3 dagar sedan**
 *  Aktiva installationer **Färre än 10**
 *  WordPress-version ** 6.3 eller senare **
 *  Testat upp till **7.1.3**
 *  PHP-version ** 8.0 eller senare **
 *  Språk
 * [English (US)](https://wordpress.org/plugins/adghost-lite/)
 * Etiketter
 * [ad inserter](https://sv.wordpress.org/plugins/tags/ad-inserter/)[ads](https://sv.wordpress.org/plugins/tags/ads/)
   [ads.txt](https://sv.wordpress.org/plugins/tags/ads-txt/)[dfp](https://sv.wordpress.org/plugins/tags/dfp/)
   [Google Ad Manager](https://sv.wordpress.org/plugins/tags/google-ad-manager/)
 *  [Avancerad vy](https://sv.wordpress.org/plugins/adghost-lite/advanced/)

## Betyg

Än så länge har inga recensioner skickats in.

[Your review](https://wordpress.org/support/plugin/adghost-lite/reviews/#new-post)

[Visa alla recensioner](https://wordpress.org/support/plugin/adghost-lite/reviews/)

## Bidragande personer

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

## Support

Har du något att säga? Behöver du hjälp?

 [Visa supportforum](https://wordpress.org/support/plugin/adghost-lite/)

## Donera

Skulle du vilja bidra till utvecklingen av detta tillägg?

 [ Donera till det här tillägget ](https://theadghost.com)