Tag size

Dynamic Imports

Depending on your tag version, it is partially or fully using dynamic imports.

Using dynamic imports, only the content that is needed for a specific visitor at a specific time is downloaded by the tag. This drastically reduce the amount of bytes being downloaded and processed hence positively impacting the influence of the AB Tasty tag on the website.

Ressources are cached in the browser for a full year. This means that if a change is done on one file (let's say on one campaign), the tag won't have to download the whole package all over again but only the updated part.

Initial tag

The tag you are required to implement on your website is the initial tag. It is a lightweight (< 3 kB) file that will have to seek for existing resources and download what is missing.

The URL syntax for this file is https://try.abtasty.com/{{your_identifier}}.js

Analytics file

The analytics dynamic import contains the data collection engine. You can still implement data sending methods before this file is executed, your data will be placed in a temporary storage, however it is always better, as a good practice, to implement a listener on the corresponding event.

The URL syntax for this file is https://try.abtasty.com/shared/analytics.{{version_hash}}.js

As you can see, this file is in the shared folder. Indeed, all of our users download the same file.

Main file

The main dynamic import contains all data related to your account (campaigns, targeting, settings...). It is the only file that is specific to your account. The size of this file depends on your usage of AB Tasty. The more campaigns you have for example, the larger it will be. ⚠️ Deferred campaigns content does not impact this file size. Only their targeting does. ⚠️ This file also contains the core engine of AB Tasty. Having no running campaigns won't pull down this file size to zero.

The URL syntax for this file is https://try.abtasty.com/{{your_identifier}}/main.{{version_hash}}.js

Libraries file

The librairies dynamic import contains all the librairies needed to make AB Tasty work.

The URL syntax for this file is https://try.abtasty.com/shared/commons.{{version_hash}}.js

As you can see, this file is in the shared folder. Indeed, all of our users download the same file.

Modifications Engine file

The Modifications Engine is the tool in charge of applying the modifications generated through the visual editor and not using custom JS or custom CSS. This dynamic import contains it. If no campaigns contains modifications made through the visual editor for the current page and current visitor, this file won't be downloaded.

The URL syntax for this file is https://try.abtasty.com/shared/me.{{version_hash}}.js

As you can see, this file is in the shared folder. Indeed, all of our users download the same file.

jQuery file

If you chose to inject AB Tasty's version of jQuery, it will be downloaded as a dynamic import when needed.

The URL syntax for this file is https://try.abtasty.com/shared/jquery.{{version_hash}}.js

As you can see, this file is in the shared folder. Indeed, all of our users download the same file.

About deferred campaigns

In the "Advanced options" step of the campaign creation flow, you can decide if the campaign must be deferred (default) or instant.

If the campaign is set to instant, the whole campaign data will be included in the main file dynamic import.

If the campaign is set to deferred, only the targeting condition will exist in the main file but the content will be downloaded as soon as the targeting is validated.

Final tag size

With this dynamic import mechanism in mind, you can breakdown the tag size by the following:

  • the initial render blocking tag: less than 3 kB

  • AB Tasty's shared features: about 70 kB

  • your campaigns, settings, targeting and global code + AB Tasty core engine: at least 30 kB

  • jQuery: around 40 kB (we highly recommand not using it)

  • any deferred campaigns (minimum 2 kB per campaign)

Remember that thanks to cache, the full bundle is only download on the initial visit. All the files are only downloaded again when needed: when you do a change in your account or when we do a release.

Last updated

Was this helpful?