How to declare my Account Domain?
Last updated
Was this helpful?
Last updated
Was this helpful?
To secure the implementation of your tag on your domain and prevent its execution on any other domain, you have to define your account domain in your account settings.
To declare your domain(s), go on the page settings/ implementation/ generic tag.
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 www.my-website.com/fr , then the domain you need to set here is "my-website.com".
You can't save a domain that is not valid. Common mistakes are including a slash (/) or the protocol (https://).
Input
Validity
Comment
example.com
yes
The tag will execute on example.com and all its subdomains.
sub.example.com
yes
The tag will only execute on sub.example.com and corresponding subdomains (eg. eshop.sub.example.com).
https://example.com
no
You must not input the protocol (http.s).
example.com/en_GB
no
You must not input the path (/xxx)
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 "www.my-website.com" and the tag will only execute on the root domain.
You can set "eshop.my-website.com" and the tag will only execute on this specific subdomain ("eshop").
The tag will use the listed domain-s to set the tracking cookie.
If you have set your domain as `website.com`, the cookie will be set to `.website.com`.
However, if you have set your domain as `www.website.com`, the cookie will be set to `.www.website.com`.
The tag is always using the widest possible domain. If you have set `order.website.com` and `website.com`, the cookie will be set on `.website.com`.
Cookies are shared following the descending tree domain, but not the other way around!
In other words, cookies set on `.domain.com` will be shared with `.subdomain.domain.com` but cookies set on `.subdomain.domain.com` won't be shared with `.domain.com`.
Keep that in mind when setting up your domain and ensure this won't cause tracking issues.
For more information about AB Tasty cookies, please refer to the following article.
⚠️ Do not declare a subdomain if you don't have a good reason to do so!
Set domain-s
Risk
Comment
website.com
No
The cookie will be set on .website.com
order.website.com website.com
No
The cookie will be set on .website.com. You should remove the subdomain as it is already included in the domain.
Visitors will be tracked along all subdomains.
order.website.com www.website.com
Yes
The cookie will be set either on `order` or on `www`, depending on where it is currently executed. Both cookies won't be shared. A visitor on `order` won't be recognized on `www`.
We strongly advise you to make sure this is what you want.
website.com other-website.com
No
Cookie will be set depending on the domain it is currently executed.
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:
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.
No specific log will be displayed. The tag will log its usual information and everything will run as expected.
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 "www.mywebsite.com", all subdomains will be excluded. Put "mywebsite.com" if you want them all to be included.
Also, if you have put "eshop.mywebsite.com", only "mywebsite.com" and "eshop.mywebsite.com" will be considered valid domains for the tag to execute.
Please refer to the matrix above to adjust your settings.
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.
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.