"Best analytics tool I've used in 14 years"

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.

Recommended for most sites. Use the managed proxy unless you already have a self-hosted proxy setup in your app or web server. See the proxy setup guide to compare both options.

Why use a proxy?

Ad blockers often block known analytics domains. A first-party subdomain on your own domain is less likely to be blocked, which can improve analytics accuracy and revenue attribution.

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.

Without a proxy, your website loads the script and sends events to 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

  1. Open Website settings -> General
  2. Find Managed Proxy
  3. Enter a neutral subdomain such as a.yourdomain.com
  4. Click Enable
Pick a short, neutral subdomain that does not describe analytics. Good examples include 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 fieldValue
TypeCNAME
Name / Hosta
Target / Valueproxy.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:

  • src loads the script from your proxy subdomain.
  • data-api-url sends events to the same proxy subdomain.
  • data-domain stays 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>
Use the same proxy hostname in both 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.
For local development, add data-allow-localhost="true" and keep data-api-url pointed at your live proxy host.

Verify the setup

  1. Visit your live website, not the proxy subdomain root
  2. Open the browser Network tab
  3. Confirm script.js loads from your proxy host, for example a.yourdomain.com
  4. Confirm event requests go to https://a.yourdomain.com/api/events
  5. 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, or datafast
  • Make sure the script uses https:// and your proxy subdomain, not datafa.st
  • Confirm data-domain is your real site domain
  • If you use a Content Security Policy, allow script-src and connect-src for your proxy hostname

Events go to your main site or localhost

This means 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

In Website settings -> General -> Managed Proxy, click Remove. Then delete the DNS records at your DNS provider and change your script src back to https://datafa.st/js/script.js.

Compare setup options

Managed proxySelf-hosted proxy
Best forMost sitesApps that already proxy requests through their own server
Code requiredNoYes
DNS requiredYes, CNAMEOptional
SSLAutomaticDepends on your host
Tracking scriptFull proxy URLs for script and eventsSame-origin paths such as /js/script.js and /api/events
MaintenanceHandled by DataFastHandled by your app/server
See the proxy setup guide for self-hosted options.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown