Managed reverse proxy
Route DataFast analytics through a subdomain you control without running proxy code. DataFast handles the routing, SSL certificate, and event collection for you.
Why use a proxy?
You do not need a proxy to start using DataFast. Add it before production, before a launch, or when you want more complete data from ad-blocking visitors.
datafa.st. With managed proxy, those requests go through your own subdomain instead, such as a.yourdomain.com/js/script.js and a.yourdomain.com/api/events, while DataFast still handles routing and SSL.1. Enable managed proxy
- Open Website settings -> General
- Find Managed Proxy
- Enter a neutral subdomain such as
a.yourdomain.com - Click Enable
a.yourdomain.com or cdn.yourdomain.com. Avoid names like analytics.yourdomain.com or tracking.yourdomain.com because blocklists may target them. Use a subdomain, not your main site hostname.If you are signed in, the docs website selector updates the dashboard link to the selected website.
2. Add DNS records
After enabling the proxy, DataFast shows the exact DNS records to add at your DNS provider. For a normal subdomain, add a CNAME record:
| DNS field | Value |
|---|---|
| Type | CNAME |
| Name / Host | a |
| Target / Value | proxy.datafast.io |
a is only an example. If you chose cdn.yourdomain.com, the name/host is cdn.If DataFast shows a TXT verification record, add it too. This can happen when the domain needs ownership verification. You can remove the TXT record after the proxy status becomes Active.
DNS propagation usually takes 1–10 minutes. SSL is issued automatically once DNS is correct. Click Check status in settings until the badge shows Active.
3. Update your tracking script
Replace the default DataFast script with a single proxied script tag. The important parts are:
srcloads the script from your proxy subdomain.data-api-urlsends events to the same proxy subdomain.data-domainstays your real website domain, not the proxy subdomain.
<script
defer
data-website-id="dfid_******"
data-domain="yourdomain.com"
data-api-url="https://a.yourdomain.com/api/events"
src="https://a.yourdomain.com/js/script.js"
></script>
src and data-api-url. Do not use a relative data-api-url for managed proxy, because relative URLs are resolved against the page hostname, not the script hostname.data-allow-localhost="true" and keep data-api-url pointed at your live proxy host.Verify the setup
- Visit your live website, not the proxy subdomain root
- Open the browser Network tab
- Confirm
script.jsloads from your proxy host, for examplea.yourdomain.com - Confirm event requests go to
https://a.yourdomain.com/api/events - Check that new visits appear in DataFast
Troubleshooting
Status stays pending
- Confirm the CNAME matches the values shown in the dashboard
- Make sure the record is a DNS record, not a URL redirect or forwarding rule
- If your DNS provider has a proxy mode, disable it for this CNAME while DataFast provisions SSL
- Wait a few more minutes, then click Check status
Status shows error
- Re-check the record type, host/name, and target/value
- Add the TXT verification record if DataFast shows one
- Confirm you are configuring the DNS zone for the root domain, such as
yourdomain.com
Analytics still blocked or not loading
- Avoid obvious subdomains such as
analytics,tracking,metrics, ordatafast - Make sure the script uses
https://and your proxy subdomain, notdatafa.st - Confirm
data-domainis your real site domain - If you use a Content Security Policy, allow
script-srcandconnect-srcfor your proxy hostname
Events go to your main site or localhost
data-api-url is missing or relative. Set it to the full proxy URL:data-api-url="https://a.yourdomain.com/api/events"
Remove managed proxy
src back to https://datafa.st/js/script.js.Compare setup options
| Managed proxy | Self-hosted proxy | |
|---|---|---|
| Best for | Most sites | Apps that already proxy requests through their own server |
| Code required | No | Yes |
| DNS required | Yes, CNAME | Optional |
| SSL | Automatic | Depends on your host |
| Tracking script | Full proxy URLs for script and events | Same-origin paths such as /js/script.js and /api/events |
| Maintenance | Handled by DataFast | Handled by your app/server |