Custom Domain

Sometimes Ad-blockers will block our metrical.xyz domain in order to try to give their users a better privacy and navigation. As we said it before, we don't store any personal information about visitors of your site, but we offer a solution about this problem: you can setup a subdomain of your main domain to serve the metrical script and calls.

With this solution, Ad-blockers won't block our script and calls and you will be able to use Metrical as normal.

How to add a custom domain to Metrical

Open your domain provider (Godaddy, Namecheap, ect) and add a subdomain of your choice with a CNAME record pointing to cdn.metrical.xyz. (add also the last dot .)

Something like this:

CNAME log.customdomain.com cdn.metrical.xyz.

Then, add the exact subdomain (without https:// or http://) to the settings page of an application on Metrical. This is necessary to obtain a SSL certificate with Let’s Encrypt, so your data (and the visits of your users will be safe and protected by HTTPS.

How to change the tracking script to use a custom domain

Change cdn.metrical.xyz to your custom domain inside the tracking script, and also add the host property inside the metrical object.

Like this:

<script>
  window.metrical = {
    "app": "Your website UUID",
    "host": "https://log.customdomain.com"
  }
</script>        
<script async
    src="https://log.customdomain.com/script.js"
    type="text/javascript">
</script>

After that, you are ready to go!

Last updated