Skip to main content

Custom Domain Proxy

Ad blockers work by blocking requests to known analytics domains. When your tracking script loads from ingest.ovyxa.com, some visitors' browsers will block it before it even executes. A custom domain proxy serves the script and receives events from your own domain, making the tracking request indistinguishable from your regular site traffic.


Why Use a Proxy

  • Ad blocker bypass — requests to analytics.yourdomain.com are not on any blocklist.
  • First-party context — cookies set by your own domain have longer lifetimes and are not subject to third-party cookie restrictions.
  • Professional appearance — no third-party domains visible in your page source.
  • Improved accuracy — typically recovers 10-25% of blocked traffic.
note

Using a proxy is optional. Ovyxa works without one, but your data will be more accurate with a proxy configured.


Setup Overview

1. Add CNAME record:  analytics.yourdomain.com → proxy.ovyxa.com
2. Register the custom domain in Ovyxa settings
3. Ovyxa provisions a TLS certificate automatically (Caddy on-demand TLS)
4. Update your tracking script src to use the custom domain

Step 1: Create a CNAME Record

In your DNS provider (Cloudflare, Route 53, Namecheap, etc.), add a CNAME record:

TypeNameTargetTTL
CNAMEanalyticsproxy.ovyxa.comAuto

You can use any subdomain you like: analytics, stats, data, t, etc. Avoid names that ad blockers might target, like tracking or analytics-tracker.

If using Cloudflare: set the proxy status to DNS Only (gray cloud), not Proxied. Ovyxa needs to handle TLS directly.


Step 2: Register in Ovyxa Settings

  1. Go to Settings → Proxy for your site.
  2. Enter your custom domain: analytics.yourdomain.com.
  3. Click Verify & Save.

Ovyxa will:

  • Check that the CNAME record resolves correctly.
  • Provision a TLS certificate via Let's Encrypt (Caddy on-demand TLS).
  • Register the domain in the ingestion pipeline so events are accepted.

Verification usually takes under 30 seconds. If it fails, double-check your DNS record and ensure the CNAME target is exactly proxy.ovyxa.com.


Step 3: Update Your Tracking Script

Replace the default script tag with your custom domain:

Before (default):

<script
defer
data-domain="yourdomain.com"
src="https://ingest.ovyxa.com/js/script.js"
></script>

After (proxied):

<script
defer
data-domain="yourdomain.com"
data-api="https://analytics.yourdomain.com/e"
src="https://analytics.yourdomain.com/js/script.js"
></script>

Key changes:

  • src now points to your custom domain for the script file.
  • data-api tells the script to send events to your custom domain instead of ingest.ovyxa.com.

How It Works

Browser                    Your DNS               Ovyxa Infrastructure
| | |
|-- GET /js/script.js ---->| |
| |-- CNAME proxy.ovyxa.com->|
| | |-- Caddy serves script
|<--------- script.js ----|--------------------------|
| | |
|-- POST /e (event) ----->| |
| |-- CNAME proxy.ovyxa.com->|
| | |-- Ingest processes event
|<--------- 202 ----------|--------------------------|

Caddy matches the incoming hostname to your registered custom domain, provisions TLS on the first request, and routes traffic to the ingest service. All of this happens transparently.


Multiple Sites, One Proxy Domain

You can use the same proxy subdomain for multiple sites. The data-domain attribute tells Ovyxa which site the event belongs to:

<!-- Site A -->
<script defer data-domain="site-a.com"
data-api="https://analytics.yourdomain.com/e"
src="https://analytics.yourdomain.com/js/script.js"></script>

<!-- Site B -->
<script defer data-domain="site-b.com"
data-api="https://analytics.yourdomain.com/e"
src="https://analytics.yourdomain.com/js/script.js"></script>

Verifying Your Setup

After configuration, verify that everything works:

  1. Open your site in a browser with an ad blocker enabled.
  2. Open DevTools → Network tab.
  3. Look for a request to analytics.yourdomain.com/js/script.js — it should return 200.
  4. Navigate to a page and check for a POST to analytics.yourdomain.com/e — it should return 202.
  5. Check your Ovyxa dashboard — the pageview should appear in the realtime view.

Troubleshooting

ProblemSolution
DNS verification failsEnsure CNAME points to proxy.ovyxa.com, not the IP. Wait for DNS propagation (up to 48h).
TLS certificate errorIf using Cloudflare, disable the orange cloud (set to DNS Only). Caddy needs direct access.
Script loads but events blockedMake sure data-api is set to your custom domain, not ingest.ovyxa.com.
Events return 403The custom domain may not be registered for your site. Re-check Settings → Proxy.
Slow first requestThe first request triggers TLS provisioning. Subsequent requests are fast.