Skip to content

Using a Custom Domain

You can route Growl events through your own domain by creating a CNAME record. This approach can help with:

  • Ad blocker bypass: Some ad blockers target third-party tracking domains. Using your own domain can improve event delivery reliability.
  • First-party context: Events appear to come from your domain, which can improve data accuracy and reduce browser restrictions.
  1. Create a CNAME Record

    Add a CNAME record in your DNS provider pointing to Growl’s platform:

    gr.yourdomain.com → cname.withgrowl.com

    Replace yourdomain.com with your actual domain. You can use any subdomain you prefer (e.g., growl.yourdomain.com, analytics.yourdomain.com, etc.).

  2. Wait for DNS Propagation

    DNS changes can take time to propagate globally. This typically ranges from:

    • A few minutes (with modern DNS providers)
    • Up to 48 hours (in rare cases with older systems)
  3. Verify DNS Propagation

    Before updating your website, verify that your CNAME is working correctly by visiting the health check endpoint:

    https://gr.yourdomain.com/v1/health

    You should receive:

    • HTTP Status: 200 OK
    • Response Body:
      {"status":"ok"}

    If you see an error or timeout, your DNS hasn’t propagated yet. Wait a bit longer and try again.

  4. Update Your Growl Script

    Once DNS verification is successful, add the data-growl-api-host attribute to your Growl script tag:

    <script
    type="text/javascript"
    src="https://cdn.withgrowl.com/ads.js"
    data-growl-publisher-id="YOUR_PUBLISHER_ID"
    data-growl-api-host="gr.yourdomain.com"
    ></script>
  5. Deploy and Test

    Deploy your updated code and verify that:

    • Ads are loading correctly
    • No console errors appear
    • Network requests are going to your custom domain