How service loading works in tarteaucitron

An event-based mechanism

tarteaucitron relies on a simple principle: events triggered by explicit user actions. These actions can occur in the management panel or directly within the page when dealing with iframe-based services.

As long as the user has not agreed to load a given service, it remains blocked. No script is loaded and no request is sent.

Allowing a service in practice

Allowing a service means saying: “I agree to load service X”. From that moment, tarteaucitron triggers the corresponding event and loads the associated script.

In the manual version, this relies on tarteaucitron.job, which declares services to load, along with parameters usually defined in tarteaucitron.user.

The professional automatic mode

The professional version introduces an automatic mode. In this case, tarteaucitron analyzes the DOM as soon as the page loads.

A list of known patterns is used to identify third-party services: Google Analytics, Google Maps, Facebook, and others. Until consent is given, these scripts or iframes are blocked.

This may look “magical”, but it is simply DOM inspection based on documented rules.

Why loading order matters

For this mechanism to work reliably, tarteaucitron must be loaded before the services it controls. This constraint is essential.

Without it, no tool can properly intercept script loading. This point is often underestimated and explains many integration issues.

tarteaucitron.io

FREE
VIEW