Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Injected ads on your website: how to find and remove them

OPS-151Low impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

Injected ads are adverts, coupon banners, price-comparison boxes or extra links that show up on your pages without being part of your design. You did not place them and you do not earn from them.

There are two very different causes. Client-side injection happens in the visitor's browser: an extension or adware program adds elements to the page after it loads. Your server and your files are untouched. Site-side injection happens when malicious code sits in your theme, plugins, tag manager or a third-party script, so every visitor sees the ads.

Where an injected ad can enter
  1. Your serverSends clean HTML
  2. Visitor's browserAdware extension adds an ad
  3. Page shownAd covers your offer
  4. Form or checkoutVisitor clicks away

Client-side ads are added in the visitor's browser. Site-side ads are served by your own pages.

Why it costs you leads or sales

Injected ads pull attention away from your call to action. They can push your form down the page, cover a button, or send the visitor to a competitor. Some add affiliate cookies that take credit for a sale you earned.

If the cause is on your site, the damage is bigger. Visitors lose trust, browsers may warn them, and the same code can be used for worse things such as redirects or data theft. The business impact of a pure client-side case is usually low, because it affects only some visitors. A site-side case should be treated as a hack.

How to check if your site has it

Tell client-side from site-side
  1. Open the page in a clean profile

    Use a private window with extensions disabled, or a new browser profile with none installed. Load the page where the ad was seen.

  2. Try another device and network

    Load the page on a phone using mobile data, not your office Wi-Fi. Some adware sits on the router or network.

  3. Compare with your own browser

    If the ad shows only in the browser with extensions, disable them one by one until it disappears. That is a client-side case.

  4. View the page source

    Right-click, choose View page source, and search for the ad's domain or text. If it is in the raw HTML, your site is serving it.

  5. Inspect the loaded scripts

    Open DevTools, go to the Network tab, reload, and filter by JS. Look for scripts from domains you do not recognise. Scripts that come from chrome-extension:// addresses belong to the visitor's browser, not your site.

  6. Check what is in your tag manager and theme

    Review every tag in Google Tag Manager, the header and footer script areas of your CMS, and any custom HTML widgets.

How to read the result
What you seeLikely causeWhat to do
Ad only in one browser with extensionsAdware extensionRemove the extension
Ad on one network onlyRouter, ISP or network adwareCheck the router and network
Ad in page source for everyoneInjected code on your siteClean the site and secure it
Ad comes from an unknown third-party scriptCompromised or unwanted tag or pluginRemove or replace the script
An unwanted ad appears on a clean page

The page loads fine, then something extra is added on top.

How to fix it

Fix depends on the cause. For a client-side case, the fix is on the visitor's device. For a site-side case, you remove the code and close the way it got in.

If the ads come from a visitor's browser
  1. Ask what they have installed

    Ask the visitor to open their browser's extensions page and disable anything they do not recognise, especially coupon, shopping, PDF or video tools.

  2. Run a malware scan on their device

    Suggest a scan with their security software. Adware often installs itself with free downloads.

  3. Reset browser settings if needed

    Chrome, Edge and Firefox all have a reset settings option that turns off extensions and clears unwanted changes.

  4. Do not try to block extensions from your page

    Scripts that fight extensions are fragile and can break your own page. Focus on keeping your own site clean.

If the ads come from your site
  1. Back up, then scan

    Take a full backup. Run a malware scanner plugin and compare core files with a fresh copy of WordPress.

  2. Remove unknown plugins and users

    Under Plugins, delete anything you did not install. Under Users, remove unknown administrators.

  3. Check theme files

    Look at header.php, footer.php and functions.php for unfamiliar script tags or encoded code. Replace the theme with a clean copy.

  4. Change all passwords

    Reset WordPress, hosting, database and FTP passwords, and update all plugins and themes.

Search a site's files for common injection patternsbash
grep -rIl --include=*.php --include=*.js --include=*.html -E "eval\(|base64_decode\(|document\.write\(unescape" .

How to confirm it's fixed

Confirmation checks
  • The ad no longer appears in a clean browser profile on mobile data
  • The ad's domain is not found in the page source or Network tab
  • Search Console shows no security issues
  • No unknown scripts load on key pages
  • Passwords and admin users have been reviewed
  • Affected visitors confirm the ad is gone after removing the extension

How to prevent it happening again

Prevention habits
  • Keep your CMS, themes and plugins updated and delete the ones you do not use
  • Use strong, unique passwords and two-factor login for admin, hosting and tag manager accounts
  • Limit who can publish in your tag manager
  • Review third-party scripts every few months and remove what you no longer need
  • Add a Content Security Policy to restrict which domains can load scripts
  • Keep regular backups so you can restore a clean version
Example Content Security Policy (test in report-only mode first)html
<meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'self' https://www.googletagmanager.com https://www.google-analytics.com;">

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard runs your real customer journeys on a schedule and checks forms, tracking hits and lead delivery. It does not scan your pages for injected ads or malicious code, and it cannot see what extensions run in your visitors' browsers.

The kind of tool that fits is a website malware and integrity scanner, plus Google Search Console's Security issues report. A Content Security Policy with reporting can also show you unexpected script sources. Use these to find and clean injected code.

Questions people ask

Why are there ads on my website that I didn't put there?

They usually come from one of two places. Either an adware browser extension on the visitor's device adds them, or malicious code on your site or in a third-party script serves them. Check the page in a clean browser profile on another network to find out which.

How do I know if ads are coming from my site or a browser extension?

Load the page in a private window with extensions disabled, on mobile data. If the ad is gone, it was the browser or network. If it still shows, search the page source and the Network tab for the ad's domain to see whether your site loads it.

Can a browser extension inject ads into my website?

Yes. Extensions can change any page after it loads, adding banners, popups or links. Your server files are not altered, so you cannot remove these from your site. The visitor has to disable or remove the extension.

Why do only some of my visitors see popup ads on my site?

If only some people see them, the cause is often on their device, such as adware or a shady extension. It can also be a site hack that targets certain countries, devices or referrers, so you should still check your own code.

How do I remove injected ads from my WordPress site?

Back up the site, run a malware scan, delete unknown plugins and admin users, replace theme files with clean copies and update everything. Then change all passwords. Check that the ad is gone in a clean browser.

Can injected ads hurt my Google rankings or ad account?

If the code is on your site, yes. It can trigger Safe Browsing warnings and Search Console security issues. Client-side ads from a visitor's extension do not affect your site's standing with Google.

Should I block browser extensions from changing my page?

No. You cannot reliably stop extensions, and scripts that try often break your own page. Keep your site clean and tell affected visitors how to remove the extension.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.