Account domain restriction

To secure the implementation of your tag on your domain and prevent its execution on any other domain, you have to define it in your account settings.

👉 Go to the implementation page


What is my domain?

Your domain is everything that goes before the first slash (the path) and after the potential subdomains.

Hence, if you have implemented your tag on , then the domain you need to set here is "".

You can't save a domain that is not valid. Common mistakes are including a slash (/) or the protocol (https://).


Validity matrix

Input Validity Comment yes The tag will execute on and all its subdomains. yes The tag will only execute on and corresponding subdomains (eg. yes The tag will execute on only, excluding all others subdomains. no You must not input the protocol (http.s). no You must not input the path (/xxx)


About subdomains

You can restrict the tag implementation to a specific subdomain. In this case, the tag will refuse to execute on a subdomain that is not listed.

For example, you can set "" and the tag will only execute on the root domain.

You can set "" and the tag will only execute on this specific subdomain ("eshop").

If you decide to add a subdomain restriction because you have other AB Tasty accounts for the other subdomains, then we strongly advise you to make sure your cookie domain restriction is also up-to-date.


Cookies and tracking

The tag will use the listed domain-s to set the tracking cookie.

If you have set your domain as ``, the cookie will be set to ``.

However, if you have set your domain as ``, the cookie will be set to ``.

The tag is always using the widest possible domain. If you have set `` and ``, the cookie will be set on ``. Specify the subdomain is of any use in this situation and you can remove it.


Cookies are shared following the descending tree domain, but not the other way around! In other words, cookies set on `` will be shared with `` but cookies set on `` won't be shared with ``.

Keep that in mind when setting up your domain and ensure this won't cause tracking issues.

⚠️ Do not declare a subdomain if you don't have a good reason to do so!


Tracking matrix

Set  domain-s Risk Comment No The cookie will be set on


The cookie will be set on You should remove the subdomain as it is already included in the domain.

Visitors will be tracked along all subdomains.


The cookie will be set either on `order` or on `www`, depending on where it is currently executed. Both cookies will be able to be shared. A visitor on `order` won't be recognized on `www`.

We strongly advise you to make sure this is what you want.
No Cookie will be set depending on the domain it is currently executed.


How to QA

A wrong or missing domain in the account settings can have an impact on the behavior of the tag on the website, hence impacting the campaign execution and data collection.

The tag will provide feedback about potential issues directly through its debug module.

First, you need to activate the debug mode of your tag by creating the needed cookie. The easiest way to do that is to type the following command in your browser's console when you are on your website:

This will create a cookie named "abTastyDebug" with a value of "true". 
At the end of the QA, you can safely remove this cookie manually or by typing the following command:
document.cookie="abTastyDebug=true;path=/;expires=Thu, 01 Jan 1970 00:00:00 GMT;";
Once the debug mode is active, the tag will start logging everything that happens regarding your campaigns, trackers and settings. This might seem overwhelming depending on the amount of campaigns you have, however, the information you are looking for about the domain restriction will always be displayed at the very beginning of the AB Tasty logs. You can scroll up until the very beginning of it.

If everything is correct

No specific log will be displayed. The tag will log its usual information and everything will run as expected.


If at least one domain is set, but incorrect

The tag will specify that the current domain it is operating on does not match its configuration. However, it will continue its regular execution without any other impact.

This probably means that either you set the wrong domain (check the spelling) or you forgot to include one or all subdomains.

For example, if you have put "", all subdomains will be excluded. Put "" if you want them all to be included.

Also, if you have put "", only "" and "" will be considered valid domains for the tag to execute.

Please refer to the matrix above to adjust your settings.


If no domain has been set

The tag will throw an error saying that it has stopped. No campaign will be displayed to anyone and no data will be collected. You must fix your configuration in your AB Tasty account immediately and refresh your tag.



We encourage you, as part of the QA, to check all your domains (including subdomains) on which your tag is implemented. 

Note that, by default, the abTastyDebug cookie will be set on the root domain where you have entered the command line. If you don't see the debug logs, make sure the cookie exists and repeat the cookie insertion.


Frequently asked questions

Can I have more domains for my account?

You might have business purposes to need more than 1 domain per account. You can get in touch with your AB Tasty usual contact to explain your situation and request more domains.


What will happen if I implement my tag on a domain that is not listed here?

The tag will simply refuse to execute on all domains that are not listed or subdomains that are excluded. No harm will be done to the said domains and subdomains.


What are the benefits of declaring a domain?

First of all, for the sake of security. Only you can decide where your tag is implemented. Someone stealing your tag won't be able to make it work on their own domain.

Then, for performance, as having only one domain per account make our tag and reportings lighter and faster to execute

Finally, it allows us to get rid of technical cookies that serve as automatic domain checker and let us move towards a cookieless world!

Was this article helpful?