Reduce impact: Ad-blockers and Apple ITP 2.x

Updated by Ole Dallerup


In 2022, more than 40% of all internet users have installed an ad-blocker on their browser, which might also block your analytics scripts. By loading your analytics script from your domain, you can reduce the risk of ad-blockers on your site. This way, you see the traffic from users using ad-blockers, giving you insights you didn't have access to before. How much ad-blockers currently impact you depends on the location of your visitors and details around the persona you are targeting. Generally, we have experienced that the more technical your visitors are, for example, software engineers, the more likely they have an ad-blocker installed. 

Apple intelligent-tracking-prevention

When your visitors are using Apple Safari, you could get impacted by Apple ITP 2.x (Apple intelligent-tracking-prevention). Dreamdata does not use third-party cookies, so in either case, the impact of Apple ITP 2.x is limited. By loading the script from your domain, you ensure that Safari continues seeing the cookies as 1st party.

Load analytics.js from your domain

  1. To set up your domain for loading analytics, pick a sub-domain example When you have done that, you should set up the following CNAME: {} -> {slug}
    You will see your slug by logging into your and looking at the URL.
  2. Contact us at and be sure to share {} with us. Dreamdata must add a configuration to enable SSL/HTTPS for your domain.
    After that, we will come back to you with an updated script for you to update on your website or inside Google Tag Manager (to use Google Tag Manager, see below).
  3. You can install the new script as below; remember to replace <API_KEY> and <TRACKING_HOST> before inserting the script on your website.
!function(){||([]),["identify","track","trackLink","trackForm","trackClick","trackSubmit","page","pageview","ab","alias","ready","group","on","once","off","setAnonymousId"],{return function(){var;return t.unshift(a),,}};for(var a=0;a<;a++){var[a];[t]}analytics.load=function(a,t){if(!document.getElementById("dreamdata-analytics")){t=t||"",;var i=document.createElement("script");i.async=!0,"dreamdata-analytics",i.type="text/javascript",i.src="https://"+t+"/scripts/analytics/v1/dreamdata.min.js",i.addEventListener("load",function(i){if(analytics&&analytics.initialize)for(analytics.initialize({"":{apiKey:a,host:t}});window.__DD_TEMP_ANALYTICS__.length>0;){var n=window.__DD_TEMP_ANALYTICS__.shift(),e=n.shift();analytics[e]&&analytics[e].apply(analytics,n)}},!1);var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(i,n)}},
analytics.load("<API_KEY>", "<TRACKING_HOST>"),

Form tracking

It's still required to set up from tracking as described here.

Suppose you are using the auto-identify script. It's possible to load that script from your own domain as well. Just replace with your own domain, and it will load.

How did we do?