Skip to content
ADD-ONS

File Proxy — Proxy external files through your domain

Serve external files (fonts, scripts) through your first-party domain to bypass blocking.

10 min Read Pokročilý Updated 5.6.2026

What is File Proxy?

The File Proxy add-on lets you serve external JavaScript files (GA4 gtag.js, Meta Pixel, TikTok Pixel, etc.) directly from your domain. Ad-blockers and ITP won't block them because they're on a first-party URL.

Why use File Proxy?

  • Bypass ad-blockers: track.yourdomain.cz/ga4.js isn't blocked.
  • First-party cookies: Scripts loaded from your domain = first-party cookies.
  • ITP bypass: Safari doesn't block first-party requests.
  • Compliance: Data doesn't pass through a 3rd-party CDN.

How to activate

  1. Go to Dashboard → Add-ons
  2. Turn on the "File Proxy" toggle
  3. Click "Add proxy"
  4. Enter:

Proxy record configuration

  • External URL: The URL of the external file (e.g. https://www.googletagmanager.com/gtag/js?id=G-XXXXXX)
  • Proxy Path: The local path on your domain (e.g. /fp/ga4.js)
  • Cache Duration: How long to cache the file (3600s = 1h, 86400s = 24h)

Usage examples

1. GA4 gtag.js proxy

External URL: https://www.googletagmanager.com/gtag/js?id=G-XXXXXX
Proxy Path: /fp/ga4.js
Cache: 86400 (24h)

Usage on the site:

<script async src="https://track.yourdomain.cz/fp/ga4.js"></script>

2. Meta Pixel proxy

External URL: https://connect.facebook.net/en_US/fbevents.js
Proxy Path: /fp/fbpixel.js
Cache: 3600 (1h)

Usage on the site:

<script async src="https://track.yourdomain.cz/fp/fbpixel.js"></script>

3. TikTok Pixel proxy

External URL: https://analytics.tiktok.com/i18n/pixel/events.js?sdkid=XXXXXX
Proxy Path: /fp/tiktok.js
Cache: 3600 (1h)

How does it work?

  1. A request arrives at https://track.yourdomain.cz/fp/ga4.js
  2. The DataNostro nginx location /fp/ → proxy_pass to the tracking/views.py FileProxyView
  3. FileProxyView finds the matching proxy entry in the database
  4. Downloads the file from the External URL (if it's not in the cache)
  5. Saves it to the Redis cache (TTL = Cache Duration)
  6. Returns the file with headers: Content-Type: application/javascript, Cache-Control: max-age=86400

Performance

  • First request: 200-500ms (download from the External URL)
  • Subsequent requests: 5-20ms (Redis cache hit)
  • Cache hit rate: 95-99%

💡 Recommendation:

Use File Proxy in combination with the Custom Loader for maximum ad-blocker bypass. All tracking scripts (GTM + GA4 + Meta + TikTok) served from your domain = up to 40% more data.

Limitations

  • Max file size: 5 MB
  • Max number of proxy entries: 50
  • Doesn't support dynamic query parameters (except ?id=XXX)
Did this article help you?
✓ Thank you for the feedback