Fleetorix
Request access

Get started with Fleetorix

One tag in your <head>, a category on the scripts that have to wait for consent, and your banner is running. This is how you install Fleetorix in six steps.

  1. 1. Request access and add your domain

    Fleetorix is still invite-only. Request access; once you have an account, add every site that needs a cookie banner in the dashboard. Each domain gets its own tag.

    Request access

  2. 2. Put the Fleetorix tag at the top of your <head>

    Copy your domain's tag from the Installation tab in the dashboard. Put it as high as you can in the <head> of every page, before your Google tag or GTM snippet, and without async or defer. Only then are Google Consent Mode's defaults in place before Google loads.

    <script src="https://cdn.fleetorix.com/v1/YOUR-DOMAIN-KEY/snippet.js"></script>

    Using a Content Security Policy? Then allow https://cdn.fleetorix.com in script-src and https://collect.fleetorix.com in connect-src.

    Is your site in more than one language? Then set lang on the <html> element of every page, for example <html lang="en">. The banner then shows in that page's language when it is one of your banner's languages. A page in another language, or without lang, gets the default language.

  3. 3. Place your Google tag

    Fleetorix works with Google Consent Mode v2. How you place the Google tag decides which mode you use; there is no setting for it.

    Mark the Google tag as Analytics (analytics), like any other script that waits for consent. Then nothing reaches Google before the visitor gives consent.

    <head>
      <meta charset="utf-8">
      <script src="https://cdn.fleetorix.com/v1/YOUR-DOMAIN-KEY/snippet.js"></script>
      <script type="text/plain" data-fleetorix-category="analytics" async data-src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
      <script type="text/plain" data-fleetorix-category="analytics">
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-XXXXXXXXXX');
      </script>
      <title>My site</title>
    </head>

    Using Google Tag Manager? Then place the GTM snippet the same way. Leave out its <noscript> part: it loads GTM without consent and can't be blocked. If you paste the whole GTM snippet into the dashboard, the Scripts tab leaves the <noscript> part out for you. Tags in your GTM container that are only for marketing you block in GTM itself, with their consent settings.

  4. 4. Block your other scripts

    Make every other script that may only run after consent inert, and label it with one cookie category. Put type="text/plain" on the tag, add data-fleetorix-category and, for an external script, use data-src instead of src. The banner runs the script as soon as the visitor allows that category.

    <script async src="https://example.com/pixel.js"></script>
    <script type="text/plain" data-fleetorix-category="marketing" async data-src="https://example.com/pixel.js"></script>
    ValueCategory in the banner
    functionalFunctional
    analyticsAnalytics
    marketingMarketing

    Don't mark necessary scripts: they always run. In the dashboard, the Scripts tab converts a pasted script for you.

    Block an embedded video or map, such as one from YouTube, Vimeo or Google Maps, the same way: on the <iframe>, use data-src instead of src and add data-fleetorix-category. Until the visitor allows that category, the banner shows a notice in the iframe with the Allow and load button. The Scripts tab converts pasted embed code for you too.

    <iframe width="560" height="315" src="https://www.youtube.com/embed/VIDEO_ID" title="YouTube video player" allowfullscreen></iframe>
    <iframe data-fleetorix-category="marketing" width="560" height="315" data-src="https://www.youtube.com/embed/VIDEO_ID" title="YouTube video player" allowfullscreen></iframe>

    If the banner doesn't load, for example because of an ad blocker, the iframe stays empty. So you may want to put a short text or a link to the video in an element next to the iframe.

  5. 5. Block images, video and audio

    Block a tracking pixel from Meta, LinkedIn or TikTok, or an image, video or audio file from another service, the same way. Put data-fleetorix-category on the outer element (<img>, <picture>, <video> or <audio>) and put every address in a data attribute: data-src for src, data-srcset for srcset and data-poster for poster. The banner loads the media as soon as the visitor allows that category. No notice takes its place.

    <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=PIXEL_ID&ev=PageView">
    <img data-fleetorix-category="marketing" height="1" width="1" style="display:none" data-src="https://www.facebook.com/tr?id=PIXEL_ID&ev=PageView">

    Leave out a pixel's <noscript> part, as with GTM: it loads the pixel when JavaScript is off, without consent, and can't be blocked. If you paste the whole pixel code into the dashboard, the Scripts tab leaves the <noscript> part out for you.

    For a <picture>, <video> or <audio>, also put the addresses of the <source> and <img> elements inside it in data attributes. The category goes on the outer element only.

    <picture data-fleetorix-category="functional">
      <source data-srcset="https://cdn.example.com/photo.webp" type="image/webp">
      <img data-src="https://cdn.example.com/photo.jpg" alt="Photo">
    </picture>
    <video data-fleetorix-category="marketing" controls data-poster="https://cdn.example.com/poster.jpg">
      <source data-src="https://cdn.example.com/video.mp4" type="video/mp4">
    </video>

    A blocked video stays empty until the visitor gives consent. If the poster comes from your own site, just leave it in poster: the browser shows it at once. Or put a short text or a link to the video in an element next to the video.

    If the banner doesn't load, for example because of an ad blocker, blocked media doesn't load either. The Scripts tab converts pasted images, video and audio for you too.

  6. 6. Check the installation

    Visit your own site and make a choice in the banner. On the Installation tab in the dashboard, your domain then shows as Seen.

    Your visitors can always change their choice with the button at the bottom left of the page. You don't need to place anything for it.