In this article, you'll find information about how the AB Tasty tag works.
The generic tag must be implemented to use AB tasty: please refer to our How to article
For more information about options in the tag, please refer to our tutorial.
Definition
A tag is a very short snippet of JavaScript code that tells the browser to download an external resource. In our case, this snippet will tell the browser to get the AB Tasty engine with all your campaigns from the AB Tasty servers.
The position (head/body) and attributes (async/defer) used when implementing the tag will determine how it will be downloaded and executed on the website.
A tag can be directly implemented in the source code of a website or through third-party software, such as a Tag Management System, whose role is to simplify the management of tags.
Differences Between the Asynchronous and the Synchronous tag
The generic tag comes in two versions: synchronous and asynchronous.
In synchronous mode, your website’s code scripts will load one after the other. A script can only be loaded if the previous one has finished loading. If a script is blocked, it will stop the script after it from loading.
On the other hand, in asynchronous mode, the different calls to the scripts will be made at the same time. All the scripts will load at the same time. In this case, if a script hangs up, it will not stop the other scripts from loading.
The disadvantage of an asynchronous tag is that the screen may seem to flicker if the modifications are applied after the website loads.
In most cases, we recommend using the synchronous tag for AB Tasty. If the tag is placed in your website’s </head> tag, you will be sure that your modifications will be applied immediately, before the website loads. This will avoid the flickering effect and will offer an optimal user experience.
About domains
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!
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.
To implement your AB Tasty generic tag, you must first specify a 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 www.my-website.com/fr , then the domain you need to set here is "my-website.com".
Validity matrix
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). |
www.example.com | yes | The tag will execute on www.example.com only, excluding all others subdomains. |
https://example.com | no | You must not input the protocol (http.s). |
example.com/en_GB | no | You must not input the path (/xxx) |
Cookies and tracking
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`. 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 `.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.
⚠️ Do not declare a subdomain if you don't have a good reason to do so!
Tracking matrix
Set domain-s | Risk | Comment |
website.com | No | The cookie will be set on .website.com |
order.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 |
Yes |
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. |
website.com other-website.com |
No | Cookie will be set depending on the domain it is currently executed. |