Troubleshooting Performance

How the tag can impact your website

Our library has a lot to do on your website:

  • creating cookies and storage, collecting events about the visitor and sending most of it to our data pipeline

  • loading dynamic modules depending on the features we are using and calling web services

  • checking for campaigns and running their modifications if needed

  • anything you asked him to do

Over the years we've introduced new features and work on reducing their impact on the performance. Yet, considering all the changes our tool can make on your website, its impact will always be slightly visible. On this page you will find solutions to reduce this impact and our footprint on your website.

The flickering effect

The flickering effect is the fact that your original content can be displayed to your visitors before our tool had the chance to finish its execution, resulting in a flicker in the content of your page. This can happen when our tag is called too late on the page or if it takes time to execute and/or validate conditions.

Most of the time, the tag will wait for DOM ready to execute its modifications. This is particularly the case if you aren't using our visual editor to make your changes.

The impact of size

Our tag is 35 kB weight when empty, additionnal needed modules may be downloaded asynchronously. Several elements might increase its overall size:

  • the amount of synchronous campaigns you are running

  • if you have set AB Tasty to inject its own jQuery library (around 40 kB)

  • the amount of widgets you are using (a recent widget weight 10 kB maximum)

  • the size of your custom code you are injecting through our tool

  • the size of your global code

Your checklist to improve your tag performance

Keep your tag light

A big tag is mechanically slower to download and may be detected as a bad practice by your favorite monitoring tool. Many things can impact your tag weight. How many active campaigns you have or the amount of custom code you've put in it. Read the following advices to spot how you can reduce the tag's footprint. We usually consider an AB Tasty tag going over 125 kB is too heavy to comply with good performances.

You can monitor the size of your tag using the Performance Center or by having a look at the network tab of your browser and looking for the try.abtasty.com/identifier.js file.

Make sure you don't have old campaigns running

That's usually not a good practice to let a campaign run for months for several reasons:

  • what is displayed on your website will be different from what is hard-coded by the IT team, increasing the risk of forgetting that your website is partially displayed by a third-party tool

  • old campaigns add up with current campaigns weight, and the sum of all these campaigns will start getting bigger and bigger overtime (see Keep your tag light)

jQuery injection

Using AB Tasty, you might want to create your campaigns using jQuery. You have two way of doing this: either you're using your own version of jQuery already implementend on your website or you want AB Tasty to inject its own version directly into the tag. Our version of the library weights approximately 40 kB, which is heavier than our raw script! If you don't need it, we highly recommend you remove it. You can do it directly from your account settings.

Watch your Global Code size

By putting JS code in your Global Code, you'll execute a script before checking your campaigns and outside of any running campaigns. This is helpful to put some trackings, transaction tag and more. However, you'll increase the size of your tag each time your adding a new line of code. We recommend keeping it simple and light.

Use the deferred campaign feature

We have a very convenient feature which allows you to purposely delay a campaign so it is not included in the tag. By default, all your live campaigns will be included in the tag. For a lot of reasons, you don't want all your visitors to download all the campaigns. If you're targeting your mobile users for a dedicated popin for example, you don't need your desktop users to download it as well. You can set each individual campaigns to be download only once their targeting is valid, this is considerably contribute in reducing the size of your tag. However, remember that it comes with a price: setting a campaign to be deferred means you're adding a bit of delay and you might experience a bit of flickering, yet it isn't obvious all the time.

Last updated

Was this helpful?