radar.snitcher.com and loads scripts from cdn.snitcher.com. While this works for most websites, some visitors use ad-blockers or privacy tools that may block requests to third-party tracking domains.
First-party tracking solves this by routing all Snitcher traffic through your own domain, making it indistinguishable from your website’s regular traffic.
Why Use First-Party Tracking?
Bypass Ad-Blockers
Requests to
your-domain.com aren’t blocked by tools that target third-party trackers.Higher Data Quality
Capture more pageviews, sessions, and identified users.
First-Party Cookies
Cookies set by your domain have longer lifespans and better browser support.
Privacy Compliance
All data flows through your infrastructure, giving you full control.
How It Works
Instead of:Setup Overview
You’ll need to configure two proxies:| Purpose | Your Domain | Proxies To |
|---|---|---|
| Tracker script (CDN) | cdn.yoursite.com | cdn.snitcher.com |
| Tracking API | tracking.yoursite.com | radar.snitcher.com |
CloudFront Setup (AWS)
CloudFront is a popular choice for proxying because it’s fast, reliable, and easy to configure.Step 1: Create SSL Certificates
If using Route 53 for DNS, create certificates for your proxy domains:- Go to AWS Certificate Manager in
us-east-1(required for CloudFront) - Request certificates for:
cdn.yoursite.comtracking.yoursite.com
- Validate via DNS
Step 2: Create CloudFront Distribution for the API
- Go to CloudFront → Create Distribution
- Configure the origin:
- Origin Domain:
radar.snitcher.com - Protocol: HTTPS Only
- Origin Domain:
- Configure cache behavior:
- Viewer Protocol Policy: Redirect HTTP to HTTPS
- Allowed HTTP Methods: GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
- Cache Policy: CachingDisabled
- Create an Origin Request Policy that forwards:
- Headers:
Origin,Accept,User-Agent,Content-Type - Query strings: All
- Cookies: All
- Headers:
- Under Settings:
- Add alternate domain name:
tracking.yoursite.com - Select your SSL certificate
- Add alternate domain name:
- Create the distribution
Step 3: Create CloudFront Distribution for the CDN
Repeat the process for the CDN:- Origin Domain:
cdn.snitcher.com - Alternate Domain:
cdn.yoursite.com - Use default caching (scripts can be cached)
- Select your SSL certificate
Step 4: Configure DNS
Create CNAME records pointing to your CloudFront distributions:Step 5: Update Your Tracking Script
Modify your Snitcher tracking script to use your proxy domains:apiEndpoint: Your API proxy domaincdn: Your CDN proxy domain
Nginx Setup
If you’re running your own infrastructure, nginx is a lightweight proxy option.Nginx Configuration
Vercel Rewrites
For Next.js sites on Vercel, use rewrites innext.config.js:
Netlify Redirects
Add to yournetlify.toml:
Testing Your Setup
After configuration, verify everything works:1. Test the CDN Proxy
200 OK response with JavaScript content.
2. Test the API Proxy
3. Check Browser Network Tab
- Visit your website
- Open Developer Tools → Network
- Look for requests to your proxy domains
- Verify no requests go to
*.snitcher.com
Troubleshooting
Requests still going to snitcher.com
Requests still going to snitcher.com
- Clear your browser cache
- Verify your tracking script has the correct
apiEndpointandcdnvalues - Check that DNS has propagated:
dig cdn.yoursite.com
CORS errors in console
CORS errors in console
Ensure your proxy forwards the
Origin header and returns appropriate CORS headers. CloudFront handles this automatically with the right origin request policy.SSL certificate errors
SSL certificate errors
- Verify certificates are valid and not expired
- For CloudFront, certificates must be in
us-east-1 - Ensure the certificate covers your proxy subdomain
Cloudflare not working
Cloudflare not working
Cloudflare doesn’t support cross-account proxying. If your main domain is on Cloudflare, use a different CDN (CloudFront, Fastly) for the proxy, or use a different subdomain not on Cloudflare.