Principle

How it works

The module hooks into two front-office events to place the tarteaucitron script as early as possible in the page — a requirement from tarteaucitron.io itself, since a late load gives third-party iframes (YouTube, Vimeo…) time to run before consent is even asked:

  1. Preconnect

    From the page header onward, dns-prefetch and preconnect hints point to the tarteaucitron.io CDN, saving connection-setup time.

  2. Loading the loader

    The load.js script — served from local cache or from the CDN depending on the mode — is injected at the very start of <head>, ahead of every other script.

  3. Additional services

    If a custom JS code is set, it is injected right after the loader, guaranteeing it runs once tarteaucitron is already loaded.

Loading...
Back to top