Analytics and Tracking

Ghost Spam

Also called referral spam

Fake traffic that appears in analytics reports even though nobody visited the site, sent straight to the analytics servers using your measurement ID.

Quick facts: Ghost Spam

Category
Analytics and Tracking
Also called
referral spam
Level
Beginner
Affects
GA4 session counts, engagement and conversion rates, referral channel reporting
Where to see it
GA4 explorations with the hostname dimension, GA4 comparisons and segments, Looker Studio filters
In this article4
  1. How ghost spam works
  2. Why it matters
  3. Common mistakes
  4. How to act on it

Ghost spam is fake traffic that appears in your analytics reports even though nobody visited your site. Spammers send made-up hits straight to the analytics servers using your site’s measurement ID, usually carrying a referrer, page title or event name that advertises their own website in the hope you will visit it.

How ghost spam works

Analytics tools collect data by receiving small requests from browsers. Anyone who knows where to send those requests, and which ID identifies your property, can send fake ones without ever loading your pages. That is the ghost: the session exists in your reports and nowhere else.

It was rife in the old Universal Analytics, whose tracking IDs followed a predictable pattern and whose server-to-server collection needed no secret. GA4’s Measurement Protocol requires an API secret, which has made ghost spam much less common. It has not disappeared, because the measurement ID is visible in every page’s source code and the browser collection route still accepts requests, so GA4 properties still see occasional waves of fake events and referrers.

It is worth separating three things that look alike. Ghost spam never touches your site. Crawler referral spam comes from bots that really do load your pages with a fake referrer. General bot traffic is automated visits of any kind, some harmless. The fixes differ, so identify which you have first.

The giveaways of ghost spam are fairly consistent:

  • The hostname is not your domain, or is blank or (not set).
  • Sessions show no engagement, a single event and zero time.
  • A sudden spike from one referrer, one city or an unusual language setting.
  • Page titles or event names containing website addresses or sales messages.

Why it matters

Spam distorts the figures you make decisions on. It inflates sessions, drags down engagement and conversion rates, and can make a referral channel look as though it is growing. For a small UK business with modest traffic, a single wave can swamp a month’s real referral data.

There is a security angle too. The domains in spam are often scams or malware. Do not visit them out of curiosity, and do not let colleagues follow them either.

Common mistakes

  • Visiting the spam domain to find out what it is.
  • Adding spam domains to GA4’s unwanted referrals list, a form of referral exclusion that changes how the source is attributed but does not remove the hits.
  • Expecting anything you set up now to clean data already collected. GA4 changes apply from that point onwards.
  • Chasing a growing list of spam domains one by one, when filtering on your own hostnames handles all of them at once.
  • Mistaking a genuine spike, such as press coverage, for spam and filtering it out.

How to act on it

Confirm it first. Build a free-form exploration with hostname, session source and country as dimensions over the affected period. If the suspect traffic sits on hostnames that are not yours, it is ghost spam. For reporting, create a segment or comparison that includes only your real hostnames, and apply the same condition to any Looker Studio reports.

Keep the rest of your data clean at the same time: GA4 excludes known bots automatically, and an internal traffic filter removes your own team’s visits. There is no setting in GA4 that blocks hits by hostname at collection, so the hostname segment is your main defence; spam sent straight to Google’s servers never passes through your own site or tagging server, so nothing there can stop it. Clean data is the starting point for any performance marketing budget decision, so I check for spam whenever I take on an account.

Do and do not

Do

  • Check the hostname dimension before treating odd traffic as real
  • Report through a segment that includes only your own hostnames
  • Apply the same hostname condition in Looker Studio reports

Do not

  • Visit domains that appear in spam
  • Rely on the unwanted referrals list to remove spam
  • Expect new settings to clean data already collected

Questions people ask about this

Can I delete ghost spam from GA4?

Not in a practical way. GA4 has a data deletion tool, but it is designed for removing personal data collected by mistake, not for cleaning traffic reports. The workable approach is to exclude spam in reporting with a segment or comparison based on your own hostnames, and to stop new spam at source where you can.

Is ghost spam a sign my website has been hacked?

No. Ghost spam never touches your website at all; it is sent directly to the analytics servers using your public measurement ID. Your site is not compromised and visitors are not affected. It only damages the accuracy of your reports.

What is the difference between ghost spam and referral spam?

Referral spam is the broader term for fake referrers appearing in your reports. Ghost spam is the kind that never visits the site, while crawler referral spam comes from bots that do load your pages. Ghost spam is filtered by hostname in reports; crawler spam may also need blocking at the server or firewall.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.