Skip to main content
Beta: Front-End Checklist is currently in beta. Some issues are still being fixed. Thanks for your patience.

Blocked Tracking Links

Links and resources pointing to known tracking or advertising domains may be blocked by adblockers, breaking navigation and functionality for a significant portion of users.

Utilities
Quick take
Typical fix time 15 min
  • Adblockers block URLs matching domain-level filter lists like EasyList and EasyPrivacy
  • Affected resources include external scripts, images, fonts, and API endpoints hosted on blocked domains
  • Analytics and tag management scripts (Google Analytics, GTM, Hotjar, Heap) are commonly blocked
  • Self-hosting or proxying external scripts through your own domain bypasses most domain-level blocks
  • 20–40% of desktop users have an adblocker installed — blocked analytics skews your data significantly
Why it matters: When a navigation link's URL matches a tracking domain pattern, the adblocker may block the request entirely — the user clicks the link and nothing happens, breaking core site functionality.

Rule Details

Adblocker filter lists such as EasyList (opens in new tab) and uBlock Origin's static filters (opens in new tab) work at two levels: element hiding (CSS) and network blocking (URLs). Domain-level blocking prevents the browser from loading any resource from a blocked domain, including scripts, images, fonts, and navigation targets.

Code Example

Filter rules like these block all network requests to matching domains:

||googletagmanager.com^
||hotjar.com^
||facebook.net^
||doubleclick.net^
||analytics.google.com^

When an adblocker matches a request to a blocked domain, the browser receives no response — the request silently fails.

Why It Matters

When a navigation link's URL matches a tracking domain pattern, the adblocker may block the request entirely — the user clicks the link and nothing happens, breaking core site functionality.

Commonly Blocked Domains

DomainServiceBlocked By
googletagmanager.comGoogle Tag ManagerMany filters
google-analytics.comGoogle Analytics (UA)Many filters
analytics.google.comGA4Some filters
hotjar.comHotjar session recordingEasyPrivacy
doubleclick.netGoogle AdsEasyList
facebook.netFacebook PixelEasyPrivacy
connect.facebook.netFacebook SDKEasyPrivacy
heap.ioHeap analyticsSome filters
fullstory.comFullStorySome filters

Some marketing tools create tracking redirect URLs that route through blocked domains:

❌ May be blocked — redirects through tracking.example.com
<a href="https://click.tracking.example.com/?url=https://dest.com&utm=abc">
  Click here
</a>
 
✅ Direct link with UTM parameters — not blocked
<a href="https://dest.com?utm_source=email&utm_campaign=spring">
  Click here
</a>

Self-Hosting Scripts to Reduce Breakage

For truly first-party functionality, self-hosting critical scripts and fonts (opens in new tab) on your own domain avoids the most common domain-level block rules while keeping essential flows reachable.

Self-Hosting Google Tag Manager

Proxy GTM through your own domain:

# Nginx proxy for GTM
location /gtm/ {
    proxy_pass https://www.googletagmanager.com/;
    proxy_set_header Host www.googletagmanager.com;
}
<!-- Load GTM from your own domain -->
<script src="/gtm/gtm.js?id=GTM-XXXXXXX"></script>

Server-Side Analytics

Move analytics collection entirely server-side to avoid all client-side blocking:

// Log events server-side
export async function POST(request: Request) {
  const { event, page } = await request.json()
 
  // Send to GA Measurement Protocol (server-to-server, not blocked)
  await fetch('https://www.google-analytics.com/mp/collect', {
    method: 'POST',
    body: JSON.stringify({
      client_id: getClientId(request),
      events: [{ name: event, params: { page } }],
    }),
  })
}

Privacy-Preserving Analytics (Unblocked)

Replace client-side tracking with privacy-focused alternatives that most adblockers do not block:

  • Plausible Analytics — first-party script, rarely blocked
  • Fathom Analytics — custom domain option available
  • Umami — self-hosted, served from your own domain
<!-- Plausible — served from plausible.io but usually not blocked -->
<script defer data-domain="example.com" src="https://plausible.io/js/script.js"></script>
 
<!-- Or self-host for maximum reliability -->
<script defer data-domain="example.com" src="/js/plausible.js"></script>
When to Break This Rule

Advertising pixels and retargeting scripts being blocked is the intended behavior of adblockers. Only work around blocking for first-party analytics (understanding your own site's performance) — not for surveillance advertising infrastructure.

Exceptions

  • Scanner output, leaked-secret detections, or stack traces should be confirmed as production-relevant before being escalated as blockers.
  • Archived dependencies, sample values, or test fixtures can create false positives, but they should still be documented and bounded clearly.
  • If multiple findings overlap, prioritize the issue that most directly enables compromise or data exposure.

Verification

Automated Checks

  • Run an automated security check, scripted probe, or log-based validation against a representative live flow.

Manual Checks

  • Install uBlock Origin with default lists
  • Open DevTools → Network tab
  • Load your page
  • Filter requests by "Blocked" status
  • Check for failed requests to analytics, tag management, or tracking domains

Use with AI

Copy these prompts to use with your AI assistant, or install the MCP server to use directly from Claude, Cursor, or Windsurf.

Check

Verify implementation

Identify external script sources, image src URLs, iframe src URLs, and anchor href values that point to known tracking domains (googletagmanager.com, hotjar.com, facebook.net, doubleclick.net, etc.). Test whether these resources load successfully with uBlock Origin enabled.

Fix

Auto-fix issues

Self-host critical external scripts on your own domain. Use a reverse proxy or server-side route to forward requests to third-party analytics APIs. For navigation links, avoid using tracking redirect URLs — use direct destination URLs with UTM parameters appended instead.

Explain

Learn more

Explain how domain-level adblocker filter lists work, which domains are commonly blocked, how blocked resources affect site functionality and analytics accuracy, and the self-hosting approach to bypass domain blocks.

Review

Code review

Review server config, headers, forms, and integration points related to Blocked Tracking Links. Flag exact responses, cookies, or browser behaviors that violate the rule, and verify them against the effective production-like response.

Sources

References used to support the guidance in this rule.

Further Reading

Tools and supplementary material for exploring the topic in more depth.

Mozilla Observatory
observatory.mozilla.orgTool

Rules that often go hand-in-hand with this one.

Avoid third-party cookies

Third-party cookies set by external domains track users across sites without their knowledge. Modern browsers are phasing them out, and regulations like GDPR and CCPA require consent before setting them.

Privacy
Adblock Element Hiding

Checks for HTML elements and CSS classes that would be hidden by common adblockers, causing layout breaks or missing functionality for users with ad blocking enabled.

Security
Avoid mixed content on HTTPS pages

An HTTPS page that loads resources over HTTP has mixed content — browsers block or warn about these requests, breaking functionality and undermining transport security.

Security
Link to your terms of service in the footer

Websites offering services to users should publish Terms of Service and link to them from every page — this establishes the legal agreement governing use of the service.

Security

Was this rule helpful?

Your feedback helps improve rule quality. This stays internal for now.

Loading feedback...
0 / 385