Setting Up Your DNS


To perform website customer data tracking with MetaRouter, you must first configure your Domain Naming Service (DNS) server and a Content Distribution Network (CDN):

  • The DNS server settings should provision a subdomain that is mapped to your MetaRouter data infrastructure. This will represent the endpoint where MetaRouter sends your customer data.
  • The CDN will host the analytics.js file that your snippet retrieves and loads on your website users' browsers. This file performs the tracking and routing of data to your MetaRouter data infrastructure.

Create a DNS Record for Your MetaRouter Cluster

This guide is relevant to those in your organization who are familiar with any CDNs you may already have set up for your website, as well as those responsible from your organization for the installation of MetaRouter.

Before You Start

Choose Your Subdomain

Regardless of whether you choose an A or CNAME record, you will need to provide a subdomain naming convention. When determining the subdomain, ensure you enforce the same naming convention across all of your domains. For example, we commonly see a.[companyname].com or analytics.[companyname].com . We recommend choosing a subdomain that is less common than these, as some ad blockers may prevent a subdomain with the words analytics , tracking , the letters a, t or other common tracking-related keywords from loading.

Ask for Your Cluster's IP Address or ANAME Record

MetaRouter will provide you with your cluster's IP Address or A record, which will need to be added to your DNS configuration. The IP Address will be required if you are configuring the cluster endpoint as an A record. We'll provide you with the A record for the cluster if you would like the endpoint to be a CNAME record.

Creating Your Record

You will need access to your DNS provider account in order to create your record. Any DNS provider should suffice. We'll walk through the process for a common DNS provider, Cloudflare:

  1. Login to your Cloudflare account.
  2. Select your website domain.
  3. Click the DNS tab, and select the Records subsection.
  4. Click the "+ Add record" button.
  5. Choose the record Type. Again, we recommend using an A record, but you may select C as well.
  6. Enter your subdomain (a , t , etc.)
  7. Enter the cluster IP address (if configuring an A record) or A records (if configuring a C record) that we sent you.
  8. Click "Save".

Your cluster should now be able to ingest data sent with your new DNS record!

CDN Configuration

When following the Analytics.js Install Guide, you will install a javascript snippet on your website. This snippet calls a javascript file to be loaded, which MetaRouter builds and makes available for download within our UI via the File Builder. When the javascript snippet loads on the page, it retrieves the contents of this file and executes the library on the page.

Javascript file management is typically managed by MetaRouter customers due to a desire to vet any javascript changes before they are pushed and loaded on their websites. This requires that you upload a file to your CDN and ensure that your snippet points to the correct location within the CDN. In addition, when changes are made to the file- such as adding/modifying a Sync Injector sync or adding/modifying a client-side integration- you must update your file within your CDN as well.

If you are unsure of how to host a javascript file on your CDN, ask your web development team for assistance. They should be able to host the file that we provide, and give you the CDN URL that you will need to include within your javascript snippet.

Once the Analytics.js file is hosted inside of your CDN and you have configured your DNS record, you are ready to install your Analytics.js SDKs and send events into your MetaRouter cluster.