Getting started Doc #6 Reviewed Nov 7, 2026

Custom domain setup

Why to run your gateway on your own subdomain, which DNS record to add, and how to check it works

A custom domain runs your gateway on a subdomain you own, instead of the shared edge.anacoic.com endpoint. For a live store, we recommend it. Custom domains are on Pro and Agency.

Why it helps

  • Tracking requests go to your own domain, like the rest of your site, so blockers that look for third-party tracking domains don’t stop them.
  • When the visitor has allowed ad storage, the gateway’s reply can set Meta’s _fbp and _fbc cookies on your own domain, renewing the values the tracker sent (see Cookies on your domain).
  • Security reviewers and your own team can see where events go.
  • The same subdomain works for the storefront, other sites and server calls.

What you need

  • A gateway in Anacoic
  • Access to your DNS provider
  • A subdomain you can use only for tracking, such as track.yourstore.com

Steps

  1. Create the gateway and check it works on the shared endpoint first.

  2. Open the gateway, then Advanced, then Domains, and select Set up your tracking domain.

  3. Enter your subdomain. The guide suggests track. plus your site’s domain.

  4. Add the record the guide shows at your DNS provider. It finds your provider and shows its steps and the name field it expects:

    TypeNameTargetTTL
    CNAMEtrack (most providers add your domain themselves)gateway.anacoic.comAuto or 300

    If your DNS is on Cloudflare, set the record to DNS only (grey cloud).

  5. Keep the guide open. It checks every 10 seconds until the record, the certificate and the routing are ready. DNS changes can take longer; you can close it and use Verify DNS on the Domains tab later.

  6. Copy the snippet again from the gateway’s Setup tab. Once the domain is ready, the script loads from your subdomain (https://track.yourstore.com/s.js) and sends events back to it. Your old snippet keeps working until you swap it.

Good to know

  • Use a subdomain, not your root domain.
  • If you run several storefronts, a subdomain for each keeps them apart.
  • Move your most important event first, check its deliveries, then move the rest.
  • If nothing shows up after the DNS change, wait a little longer, then see Troubleshooting.
  • Can’t add a DNS record? You can serve the tracker from a path on your own site instead.