Documentation

Installing FlexyConsent

FlexyConsent is one script tag. Once it is on the page it shows the banner, records the visitor's choice, blocks trackers until they make one, and speaks the consent standards your other tools already understand — IAB TCF, IAB GPP, US Privacy, Google Consent Mode v2, Google Additional Consent and Microsoft UET — without any further configuration.

1. Create a project

Sign in to the FlexyConsent dashboard and create a project for your domain. A project holds one site's settings, its cookie declarations and its banner design.

2. Copy your script tag

The project's install snippet looks like this, with your own 40-character script ID:

<script src="https://flexyconsent.com/d/6/1/9/61946a9bb1d7c74ae4e8776ba1a13df0cb0cf835.js"></script>

The first three path segments are simply the first three characters of the ID.

3. Put it FIRST in <head>

This is the one placement rule that matters, and it is not a style preference.

FlexyConsent blocks trackers by intercepting the browser APIs they use — script injection, cookies, storage, workers, network calls. It can only intercept what has not already happened. Put the tag above every other script in <head> and blocking starts at parse time, before a single tracker has run. Put it lower and everything above it has already loaded, set its cookies and sent its first request, and no consent tool can take that back.

<head>
  <meta charset="utf-8">
  <script src="https://flexyconsent.com/d/…/<your-id>.js"></script>
  <!-- everything else: analytics, tag managers, pixels, fonts -->
</head>

Load it synchronously — no async, no defer. Both hand control back to the parser, which is exactly the gap the script exists to close.

4. Check it is working

Open your site and look at the browser console. Every load prints one line naming the running version:

FlexyConsent CMP v1.0.30 — consent script started (part 1, generated)

The version number will be whichever is current; the line itself is what you are looking for.

If that line is missing, the tag is not on the page or its ID is wrong. If you see the banner but not the line, you are looking at a cached copy of an older script — hard-reload.

Then check the standard APIs answer, in the same console:

__tcfapi('ping', 2, console.log);   // cmpId 317, cmpStatus "loaded"
__gpp('ping', console.log);          // signalStatus "ready"
__fcapi('getConsentState', console.log);

Platform integrations

What you get without configuring anything

Your own code

To gate your scripts on the visitor's choice — under any privacy regime, including ones with no industry signal such as Brazil's LGPD or Türkiye's KVKK — use the publisher consent API.

Google Tag Manager →