The stack
- PixelYourSite Professional with automatic events enabled
- A configured GA4 Measurement Protocol connection inside PYS Pro
1. Turn the event on
PixelYourSite Pro → Dashboard → Track key actions with the automatic events → Track 404 pages → on.

2. View the data
No Custom Dimensions to register — the 404 event uses GA4’s built-in page_location, page_referrer, and page_title.
Quick check — Realtime
GA4 → Reports → Realtime. Trigger a known 404 on your site. Watch for 404 in the “Event count by Event name” card. It appears within seconds.
Day-to-day view — Engagement → Events
GA4 → Reports → Life cycle → Engagement → Events. Find 404 in the list and click in. Use the dimension dropdown to switch between Page location (broken URLs) and Page referrer (where visitors came from).
Deep view — Exploration
GA4 → Explore → Blank → Free form.
- Date range: Last 30 days.
- Import dimensions:
Event name,Page location,Page referrer. - Import metrics:
Event count,Total users. - Drag
Page locationandPage referrerinto Rows. - Drag
Event countandTotal usersinto Values. - Filters:
Event nameexactly matches404. - Sort by
Event countdescending. - Save as 404s — last 30 days.
One row per broken-URL-and-referrer. Top of the table is what to fix first.
3. How to read it
Five patterns:
One URL, no referrer. Stale bookmark, old link in an email or PDF, or a URL that used to be indexed. Fix: 301 to the closest live page.
One URL, internal referrers. A broken link in your own site. Fix: open the referrer, find the dead link, fix at the source.
One URL, external referrer. Someone linked to a URL that no longer exists. Fix: 301 to the right page, and reach out if the source is reachable (partner site, newsletter).
Many 404s with paid utm_source or utm_medium=cpc. A campaign URL is wrong — typo, deleted landing page, or a tracking template mangling the URL. Fix: pause the campaign until the URL is corrected.
Long tail of strange URLs, no referrer. Bot probing. Ignore them, or block at the firewall if volume is high.
4. Alert on spikes
GA4 → Reports → Insights → Create:
- Frequency: Daily
- Metric:
Event count - Condition:
Event nameequals404 - Threshold: % change anomaly detection
- Email notification: your team
Regressions land in your inbox instead of in a customer ticket.
5. Recover wasted ad spend
The most expensive 404s are the ones paid traffic hits. Add Session medium to the Exploration as a filter set to cpc. Every event in that view is a paid click that landed on a dead page. Fix the URL or pause the campaign.
What this won’t catch
The event fires when WordPress runs and is_404() is true. It does not capture:
- Static assets (images, CSS, JS) returning 404 — they don’t load WordPress.
- 404s served by a CDN or full-page cache before WordPress runs.
- Soft 404s — pages that return 200 OK with “not found” content.
- 404s on subdomains where PixelYourSite isn’t installed.
For server-level logs that cover all of these, use your web server’s access logs.