Skip to main content

Configurazione

Colori

Categorie cookie

Obbligatorio

Anteprima

<!-- Cookie Banner -->
<div id="cookie-banner" class="cookie-banner cookie-banner--bottom" role="dialog" aria-label="Cookie Consent">
  <div class="cookie-banner__inner">
    <p class="cookie-banner__text">Utilizziamo cookie per migliorare la tua esperienza sul nostro sito. Puoi scegliere quali cookie accettare.</p>
    <div class="cookie-categories">
    <div class="cookie-category">
      <label>
        <input type="checkbox" id="cookie-necessary" checked disabled>
        <strong>Necessari</strong> <em>(necessari)</em>
      </label>
      <p>Essenziali per il funzionamento del sito. Non possono essere disabilitati.</p>
    </div>
    <div class="cookie-category">
      <label>
        <input type="checkbox" id="cookie-analytics" checked >
        <strong>Analitici</strong>
      </label>
      <p>Ci aiutano a capire come interagisci con il sito raccogliendo dati anonimi.</p>
    </div>
    <div class="cookie-category">
      <label>
        <input type="checkbox" id="cookie-marketing"  >
        <strong>Marketing</strong>
      </label>
      <p>Utilizzati per mostrarti annunci personalizzati in base ai tuoi interessi.</p>
    </div>
    </div>
    <div class="cookie-banner__actions">
      <button id="cookie-accept-all" class="cookie-btn cookie-btn--primary">Accetta tutti</button>
      <button id="cookie-accept-selected" class="cookie-btn cookie-btn--secondary">Accetta selezionati</button>
      <button id="cookie-reject" class="cookie-btn cookie-btn--ghost">Rifiuta</button>
    </div>
  </div>
</div>

Come utilizzare Cookie Banner Generator

Configure text, colors and banner position

In the "Settings" panel, choose where the banner appears, personalize text, button labels, and background colors.

Manage Cookie Categories

Category "Essential" is always present and not deactivatable. Add, rename or remove optional categories (e.g. Analyticals, Marketing) with the "Add Category" button.

Activate preview to see the result

Premi "Show Preview" to see the banner as it will appear on the site, with categories and buttons configured.

Copy HTML, CSS and JavaScript on your site

Pass through HTML, CSS and JavaScript sheets, copy the generated code with the "Copy" button. Paste the three blocks into your project to activate the banner.

Suggerimenti

  • Set a reasonable cookie expiration time interval (e.g. 180-365 days): frequent consent requests worsen the user experience.
  • Manually link rejection/acceptance of categories to your actual tracking scripts (e.g., load Google Analytics only if the "Analytics" category is accepted in the saved cookie).

Domande frequenti

Is the generated banner automatically compliant with GDPR?

The tool generates a banner with opt-in for categories (accept all, accept selected, reject) and no pre-selected boxes for non-essential categories, in line with GDPR principles. However, it does not replace legal consultation: always verify with a DPO or lawyer the specific compliance to your case of use and privacy policy.

How is user selection saved?

Cookie with consent data is saved with a name of "cookie_consent" (JSON format with category state), set to expire after configurable days and has attributes SameSite=Lax and Secure. If the cookie already exists, the banner will not be shown again.

Can I add custom cookie categories?

Yes. Beyond the predefined categories (Required, Analytical, Marketing), you can add new ones with "Add Category" and modify their name and description. Only the category "Required" is locked as it's essential to site functionality.

What's the difference between "Accept Selected" and "Reject"?

Accept selected" saves consent only for categories with the checkbox checked at the time of a click. "Reject" sets all optional categories to not accepted, keeping only necessary cookies active.

Does this banner replace a full CMP platform?

No. It's a lightweight HTML/CSS/JS generator for simple sites. For complex scenarios (IAB TCF integration, auto-blocking third-party scripts, consent audit logs), consider a dedicated Consent Management Platform.