Data protection under control: simply block external content
Asynchronous etracker code for top Core Web Vitals values
![](https://www.etracker.com/app/uploads/2021/06/mountains-4070574_1280-e1623156060588-1.jpg)
by Katrin Nebermann
What are the Core Web Vitals?
The ranking of your website no longer depends solely on content, but also on technical performance. Loading time is seen as the basis of any good user experience. And to attach even more importance to the topic of loading speed, Google has introduced the Core Web Vitals metrics.
The Core Web Vitals are three metrics for evaluating the user experience or user-friendliness of a website: LCP (Largest Contentful Paint/loading process), FID (First Input Delay/Interactivity) and CLS (Cumulative Layout Shift/Visual Stability). All three are an essential part of the ranking factors and are measured on this basis:
Good | Needs improvement | Poor | |
---|---|---|---|
LCP | <=2.5s | <=4s | >4s |
FID | <=100ms | <=300ms | >300ms |
CLS | <=0.1 | <=0.25 | >0.25 |
But fast loading times not only make the Googlebot happy and have a positive influence on the search engine ranking. They also reduce the bounce rate. This is because the longer visitors have to wait for a page to load, the higher the proportion of those who bounce and visit another website.
What is the relationship between the Core Web Vitals and etracker analytics?
If external scripts are integrated on the website, this can have a negative effect on the loading speed of the website content. This applies in particular to the First Input Delay (FID) metric, i.e. the time until the user can interact with the page. This is a matter of milliseconds (see table above).
In order for etracker Analytics to collect data, the etracker code first initiates the loading of another script. This process can be synchronous or asynchronous. In synchronous mode, the actual content of the page is only loaded after the etracker code has been executed. In asynchronous mode, however, scripts can be executed simultaneously. This means that etracker Analytics in asynchronous mode has no influence on the loading speed of website content and other scripts, thus ensuring top Core Web Vitals.
Optimal code integration for excellent Google rankings
In order not to impair the loading speed and thus the Core Web Vitals and the Google ranking, the etracker code is now loaded asynchronously by default. This is because in asynchronous mode, tracking has no influence on the loading speed of website content and other scripts.
The asynchronous code can be found in all etracker accounts under Account Info → Settings → Setup/Tracking Code:
![](https://www.etracker.com/app/uploads/2021/06/asynch.png)
We recommend that customers who currently use the synchronous code simply adapt the existing etracker code. To do this, simply replace src=”//static.etracker.com/code/e.js with src=”//code.etracker.com/code/e.js” in the code and add the “async” keyword.
When using the etracker Optimizer, however, we recommend using the synchronous mode so that changes are applied immediately before the pages are loaded and flickering effects are avoided. With the help of our Content Delivery Network technology, we also ensure maximum performance in script delivery in order to minimize the impact on loading time.
Attention when using asynchronous code retrieval and ecommerce events. This can lead to timing problems which result in the ecommerce events not being successfully transmitted. Therefore, the Ecommerce API should be called in the following function, which ensures that the etracker code has already been loaded before the Ecommerce events are sent:
|