Knowledge Base      


How do I set up a custom domain for use with Campaigns?


A custom domain allows you to proxy your tracking code in a way that it can never be blocked by ad blockers, privacy and tracking blockers, or visitors' privacy settings. This results in extreme tracking accuracy.

While setting this up is a bit technical, absolutely anyone can do this by following the steps below as long as you have access to the domain registration account used to register the domain you want to use.

Also, please note that you can always come back and set this up later so don’t stress about it …


Step 1 – Register a new domain, e.g. www.something.com or decide on a sub-domain you want to use with an existing domain, e.g. track.mysite.com. You cannot use just the root domain, e.g. yourdomain.com.

Here are a few suggestions if you want to use an existing domain:

clk.yourdomain.com
scripts.yourdomain.com
js.yourdomain.com



Step 2 – Log in to your domain registrar or DNS management platform and add a CNAME record to your domain’s DNS pointing to cdn.clkmc.com using the shortest Time To Live (TTL) value they allow.

For example, in Cloudflare, you’d first select your domain, then go to DNS > Records.

  


Then you’ll select “Add Record”.

 
 

Then set things up as shown in the following screenshot. If you wanted your custom domain to be scripts.yourdomain.com instead, you’d use scripts instead of clk in the Name box.
 
 
 
 
Note: If you’re using Cloudflare, be sure to select “DNS Only” and NOT “Proxied” which is usually selected by default.


Step 3 – Wait a few minutes, then go to the Campaigns Custom Domain tool in the Campaigns Tools menu. Enter your domain and click “Continue”. If you get a “CNAME doesn’t exist” error, simply wait another few minutes and try again.
 

Step 4 – Go back to your DNS management platform and add a TXT record with the Name and Value provided.

 
 

In Cloudflare, you’d add a new record the same way you added a CNAME record in Step 2. This time we’ll switch the Type to TXT instead of CNAME.

The screenshot below shows an example, but you’ll use the actual Name and Value provided by ClickMagick.

 


Step 5 – Wait for your domain to be verified. This is automatic and usually takes just a few minutes.

Once your domain has been verified and you get the green light, you’re good to go!

The Website Code tool will now use your custom domain when generating new tracking code, and you can also modify any existing tracking code to use your new custom domain.


Modifying existing tracking code to use your custom domain

Most users will probably want to use the Website Code tool to update any existing tracking codes, but if you’re comfortable with it you can also update your existing tracking code manually.

To update any existing tracking code, you just need to modify the last line. Replace //cdn.clkmc.com with //your.domain.com and replace cmc.js with any 8-character alphanumeric string followed by .js e.g. abcd1234.js

Article 942 Last updated: 10/26/2024 2:17:07 PM
https://www.clickmagick.com/kb/?article=942