First-party proxy (optional)
Some ad blockers filter third-party analytics domains. A first-party proxy forwards pageview requests through your origin so they look like ordinary same-site traffic.
1. Install the package
npm install @antlytics/analytics
# or
pnpm add @antlytics/analytics
2. Create the proxy route on your site
Re-export the SDK handlers (path may vary with your framework):
// app/api/antlytics/pageview/route.ts
export { GET, OPTIONS, POST } from "@antlytics/analytics/proxy"
3. Point the snippet at your domain
Change the u variable in your snippet to your proxy URL (not the raw Antlytics host):
var u="https://your-domain.com/api/antlytics/pageview";
The SDK proxy forwards to Antlytics /api/ingest/pageview upstream. Your public path stays under /api/antlytics/... on your domain.
Something missing? Get in touch and we will update these docs.