Works with your stack
Cookie consent for Ad Inserter
the ad code is hidden
Ad Inserter places your ad code on your pages, but has no banner and does not use WP Consent API. Many blocks are printed with their code encoded, so a consent tool that reads the page cannot see which ad network they call. The safest gate is the block’s own Cookies list.
By Spacetime · adinserter.pro · WordPress.org
Cookie Rocks in the Ad Inserter consent FAQ
Is this your product? Tell us if anything here is out of date. Write to us
Ad Inserter
WordPress plugin
- Tested version
- 2.8.20
- How
- Tested automatically around each Cookie Rocks version
- Last test
- 7 November 2026
- Latest version
- 2.8.20 tested
- Active installs
- 300,000+
What Ad Inserter adds to your visitors’ browser
No trackers In our test of Ad Inserter 2.8.20 on 7 November 2026, the plugin itself added no tracker and no cookie. What you place in your pages with it, such as a video or a map, still counts.
What matters for consent with Ad Inserter
Ad code a banner cannot read
With the default dynamic setting, a block with a browser-side check, or with lazy, manual or delayed loading, is printed with its code encoded. Ad Inserter’s script decodes and runs it. A consent plugin that reads the page markup cannot see the AdSense or other network address.
A Cookies list per block
Each block can wait for a cookie listed in its Cookies list. The check runs in the browser only with client-side insert or show. A server-side check is frozen by page caching.
Showing the block after consent
A waiting block comes back on the page only on IAB TCF signals, on the events of one consent plugin, or when ai_load_blocks() is called.
Ad blocking detection calls trackers
When ad blocking detection is on, with “Use external scripts” (on by default), every page gets bait tags pointing to Google Analytics, Google Tag Manager, Quantcast and other ad servers, before any choice. It also sets cookies of its own. Turn off “Use external scripts”.
What our tests found on Ad Inserter
Depends on a setting · Ad InserterAd blocking detection loads Google and ad scripts before the choice
setting “Use external scripts (ad blocking detection)” · by default: on
- Off by default; the problem starts when you turn it on.
- Adds bait tags for Google Analytics, Tag Manager, Quantcast and Media.net.
- Also loads an image from dummyimage.com and checks Google's AdSense script.
- Sets the cookies aiADB, aiADB_PV, aiADB_PR and aiBLOCKS.
What to do: Turn off Use external scripts, or define AI_ADB_NO_GOOGLE_ANALYTICS, AI_ADB_NO_GTM, AI_ADB_NO_QUANT, AI_ADB_NO_MEDIA_NET, AI_ADB_NO_DUMMYIMAGE and AI_ADB_NO_GOOGLESYNDICATION in wp-config.php.
Read in its code, 16 October 2026, Ad Inserter 2.8.19.
Full detail
Ad Inserter's ad blocking detection is off by default. When it is on with Use external scripts (on by default), every page footer gets bait tags before any choice: <object> tags pointing to google-analytics.com/analytics.js, googletagmanager.com/gtag/js, secure.quantserve.com/quant.js and contextual.media.net/dmedianet.js, an <img> from dummyimage.com, and after load a HEAD fetch to pagead2.googlesyndication.com/pagead/js/adsbygoogle.js whose address is base64-encoded in an inline script. Cookies: aiADB (30 days by default) and aiADB_PV (365 days) when a blocker is handled, aiADB_PR for redirection, and aiBLOCKS (365 days) for per-block close and view limits.
Depends on a setting · Ad InserterAd Inserter can make each ad block wait for a consent cookie
setting “Cookies list (per block)” · by default: empty
It has no banner and no consent signals. A block can wait for a cookie from its Cookies list; the check runs in the browser only with Client-side insert or show.
Read in its code, 16 October 2026, Ad Inserter 2.8.19.
Full detail
Ad Inserter shows no banner and does not use WP Consent API or set Consent Mode defaults. Each block can wait for a cookie listed in its Cookies list (whitelist or blacklist, empty by default); JSON cookies are read with the syntax name[key][*]=value after decodeURIComponent and JSON.parse. The check runs in the browser only with Client-side insert or Client-side show; server-side checks are frozen by page caching. Blocks waiting for consent are re-inserted on the page only on IAB TCF signals, on the events of one consent plugin, or when ai_load_blocks() is called; tcf- conditions hide the block if window.__tcfapi is missing after three tries.
Set before the choice · Ad InserterAd Inserter hides ad code from banners that read the page
setting “Dynamic blocks” · by default: Client-side insert
Blocks with a browser-side check or lazy, manual or delayed loading are printed encoded, so a banner reading the page cannot see the ad address. Default blocks are printed in clear.
What to do: Put the consent condition in each ad block's Cookies list (whitelist) instead of relying on a banner reading the HTML.
Read in its code, 16 October 2026, Ad Inserter 2.8.19.
Full detail
With Dynamic blocks set to Client-side insert (the default), an Ad Inserter block that has a check run in the browser (cookie, URL parameter, referrer or client list, scheduling, a device selection other than all) or uses lazy, manual or delayed loading is printed with its code base64-encoded in a data-code attribute of a div (ai-dynamic, ai-lazy, ai-manual). Ad Inserter's own script decodes it and inserts it, and the inserted scripts run. A consent plugin that reads the page markup cannot see the ad network address. A block with default settings and no list is printed in clear.
How we test it
Around each version, with its latest release
Around each Cookie Rocks version, a fresh WordPress installs its latest version from WordPress.org next to Cookie Rocks and runs the same checks. A new version joins the next run on its own.
- Ad Inserter 2.8.20, tested on 7 November 2026.
- The banner shows, the trackers of the test page wait for consent and load after it, and Cookie Rocks raises no PHP error.
- Settings of the test: Default settings after activation.
- Last run: Ad Inserter 2.8.20 on 7 November 2026, with WordPress 7.1.3.
Ads
Other plugins of the same kind.
Questions
How do I make an ad block wait for consent?
Put the consent condition in the block’s Cookies list, as a whitelist, and keep the check in the browser. Cookie Rocks holds known trackers until the visitor agrees, but the encoded code is out of sight of any banner that reads the page.
What happens after the 30-day trial?
The banner, your visitors’ choices and your proofs of consent keep working. Without a key, most settings lock, updates and support stop. Take a key at any time and everything opens again.
For sites with Ad Inserter
Ads after the choice.
gate each block
Every feature of the complete plugin for 30 days, no card.
- During the trial: everything, including the full settings and the scans
- After 30 days without a key: the banner, your visitors’ choices and your proofs of consent keep working
- What waits for a key: most settings, updates and support

Get your trial key
Your e-mail and your site. Your key arrives as soon as you confirm your e-mail.