Installation guide

Everything you need to connect a website to AdRecover.

1. Add the snippet

After adding your website in the dashboard, copy your personal snippet. It looks like this:

<script async src="https://adrecover.onrender.com/embed.js" data-publisher="pub_XXXXXXXXXXXXXXXX"></script>

Use the snippet from your dashboard: it contains your own publisher ID. The same snippet works on all websites in your account.

2. Where to place it

Paste the snippet just before the closing </body> tag of every page, or once in the shared template, layout or footer include that every page uses.

The script is asynchronous and will not block rendering. Placing it in the <head> also works.

WordPress and other CMSs

  • WordPress: use a header/footer code plugin or add the snippet to your theme's footer.php before </body>.
  • Shopify: Online Store → Themes → Edit code → theme.liquid, before </body>.
  • Wix, Squarespace and similar: use the custom code / code injection setting for the footer.
  • Google Tag Manager: create a Custom HTML tag with the snippet that fires on all pages.

3. Check the connection

Open any page of your website in a normal browser window. Then click Check connection in the installation dialog. The website status changes to Connected after the first page view reaches AdRecover.

Publishing a notice and connecting the script are separate: a published notice is only shown once the script is installed.

Recovery modes

  • AdBlock Wall: a non-dismissible dialog while blocking is confirmed. Visitors can open instructions and check again.
  • Friendly Reminder: a dismissible message with frequency controls.
  • Monitoring only: measurement without any visible message. Nothing is shown until you publish a notice.

Targeting rules

New notices skip the homepage by default. To test a newly published wall, visit an internal page (for example an article) with your ad blocker enabled.

You can exclude paths such as /login or /checkout. A rule matches the path itself and everything below it. End a rule with * to match any path that starts with it.

Single-page applications

The script detects client-side navigation through the History API and treats each new path as a new page view. You do not need to call anything yourself.

Content Security Policy

If your site uses a Content Security Policy, allow the AdRecover host for scripts and connections. Detection also performs a test request to a common ad host; if your CSP blocks it, detection may return inconclusive results more often.

Testing with an ad blocker

  • Install the script and publish the AdBlock Wall.
  • Enable an ad blocker (for example uBlock Origin or AdBlock) and open an internal page.
  • The wall appears. Click Check again without changing anything: the wall stays.
  • Pause your blocker for the site and click Check again: the wall closes.
  • Re-enable the blocker and load another page: the wall appears again.

Troubleshooting

  • Status stays Waiting for installation: make sure the snippet is on the live site and that the domain you registered matches the address in the browser (www and non-www are treated as the same site; other subdomains need their own entry).
  • No notice appears: check that the notice is published, the page is not excluded, and that you are not on the homepage when Skip homepage is enabled.
  • The dashboard shows a warning about an unregistered domain: your snippet was loaded on a domain that is not in your account. Add the domain if it is yours.

Privacy and storage

The script sets no cookies. It uses session storage to count pages within a visit and, for the Friendly Reminder with Show once, local storage to remember that the reminder was shown. AdRecover does not store visitor IP addresses; detection events are kept for a limited time and then only daily totals remain.

Content-Security-Policy: script-src 'self' https://adrecover.onrender.com https://pagead2.googlesyndication.com; connect-src 'self' https://adrecover.onrender.com https://pagead2.googlesyndication.com