HTML / Static Sites Integration

Cookie Banner for HTML Sites

Don't have a fancy framework? No problem. TinyConsent works with plain HTML websites, static site generators, and simple landing pages. One script tag in your HTML is all you need for GDPR compliance.

60s
Setup time
<5KB
Script size
GDPR
Compliant

Get Your HTML / Static Sites Code

No signup required to get started

Live Banner Preview

This is how the cookie banner will appear on your HTML / Static Sites site.

My HTML / Static Sites Site uses cookies to enhance your experience and analyze traffic. By clicking "Accept", you consent to our use of cookies.

HTML / Static Sites Integration Code

Add this to: index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Website</title>
    
    <!-- TinyConsent Cookie Banner - Add this line -->
    <script src="https://scripts.tinyconsent.com/api/scripts/YOUR_SCRIPT_ID" async></script>
    
    <!-- Your other head content -->
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- Your page content -->
    
    <!-- TinyConsent will automatically inject the banner here -->
</body>
</html>

Replace YOUR_SCRIPT_ID with your actual script ID from TinyConsent.

Why HTML / Static Sites Sites Need a Cookie Banner

Even simple HTML sites often include Google Analytics, embedded videos, social buttons, or contact forms with tracking. If you have EU visitors, these all require cookie consent.

What TinyConsent Handles for HTML / Static Sites

  • Automatic blocking of tracking scripts until consent
  • Technical consent collection with region detection
  • Google Consent Mode v2 integration
  • Consent storage and audit logging
  • Customizable design to match your site

How to Add a Cookie Banner to HTML / Static Sites

1

Generate your script

Visit tinyconsent.com to get your unique script tag.

2

Open your HTML file

Open index.html or your main HTML file in a text editor.

3

Find the <head> section

Locate the opening <head> and closing </head> tags.

4

Paste the script

Add the TinyConsent script inside the head section.

5

Save and upload

Save the file and upload to your web hosting.

6

Test the banner

Visit your site to confirm the cookie banner appears.

HTML / Static Sites Tips

  • Works with any HTML file — no build tools needed
  • Perfect for landing pages and simple websites
  • Compatible with static site generators like Hugo, Jekyll, 11ty
  • Just copy/paste — no configuration required

Why TinyConsent for HTML / Static Sites

60-Second Setup

No npm packages, no build configuration. Just one script tag and you're compliant.

Lightweight

Under 5KB initial load. Zero impact on your HTML / Static Sites bundle size.

Technical Infrastructure

Script blocking, consent logging, and region detection. Technical foundation for consent workflows.

Developer-Friendly

JavaScript API for checking consent status. Perfect for conditional script loading.

Frequently Asked Questions

I just have a simple HTML page. Do I need this?

If you use any analytics, embedded videos, or third-party services AND have EU visitors, yes. GDPR applies regardless of site complexity.

Can I add this to multiple HTML pages?

Yes. Add the same script tag to every HTML page, or use a shared header include if your setup supports it.

Do I need to modify each page?

For static HTML, yes — add the script to each page. For sites with templating, add it once to your base template.

Will this work with my web hosting?

Yes. TinyConsent works with any hosting: shared hosting, Netlify, GitHub Pages, Amazon S3, or any server that serves HTML.

What if I don't know HTML?

The setup is simple — just paste one line of code. If you can edit a text file, you can add TinyConsent.

Does this work with Jekyll/Hugo/11ty?

Yes. Add the script to your base layout template. It will appear on all generated pages.

Ready to Add a Cookie Banner to HTML / Static Sites?

Get compliant in 60 seconds. No signup required to try.