← Back to TinyConsent
Documentation
v2.0.0

Cookie Banner Script Tag

Add cookie consent infrastructure to any website with a single script tag. No coding required.

Quick Start

Installation Code

Copy this script tag and paste it in your website's <head> section:

<script src="https://scripts.tinyconsent.com/api/scripts/YOUR_SCRIPT_ID" async></script>

Replace YOUR_SCRIPT_ID with your unique script ID from the dashboard.

HTML Example

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>My Website</title>

    <!-- TinyConsent Cookie Banner -->
    <script src="https://scripts.tinyconsent.com/api/scripts/YOUR_SCRIPT_ID" async></script>
</head>
<body>
    <h1>Welcome to my website!</h1>
</body>
</html>

WordPress Example

<!-- Add to theme header.php -->
<!-- Or use "Insert Headers and Footers" plugin -->

<script src="https://scripts.tinyconsent.com/api/scripts/YOUR_SCRIPT_ID" async></script>

<!-- Place before </head> -->

Features

Automatic Cookie Blocking

Blocks analytics, marketing, and tracking scripts until user consent is obtained.

Technical Features

Handles consent for EU and California users with appropriate legal requirements.

Google Consent Mode v2

Automatically signals consent status to Google Analytics and Ads.

Customizable Dashboard

Change colors, text, position, and behavior without touching code.

Frequently Asked Questions

How do I add the TinyConsent script to my website?

Simply copy the script tag and paste it in your HTML head section before other scripts. The script will automatically load and display the cookie banner.

Does the script tag work with any website?

Yes, the script tag works with any HTML website, WordPress, static sites, or any platform that allows custom HTML/script injection.

Where exactly should I place the script tag?

Place it in your HTML <head> section, ideally before other scripts. This ensures the cookie banner loads early and can block tracking scripts.

What technical features does the script tag provide?

The script tag provides cookie blocking, consent logging, region detection, and automatic script management for consent workflows.

Can I customize the banner appearance?

Yes, you can customize colors, position, text, and behavior through your TinyConsent dashboard after installation.

Related Documentation

Ready to Get Started?

Generate your unique script ID and add cookie consent to your website in minutes.