Consent Banner Dev Preview

This page loads the TruePrivacy consent banner in development mode. The banner fetches config from the backend API at http://localhost:3000. Start the backend with make dev-backend or make dev-mock.

Actions

Demo Sites

Realistic pages for testing the consent banner in context.

Travel Booking demo (Wanderly) →

Consent Status

Integration Snippet

<script src="https://cdn.truecookieconsent.com/js/latest/banner.js" data-key="YOUR_PUBLIC_KEY"></script>

JavaScript API

// Show preferences modal programmatically
window.__tp.showPreferences();

// Check consent for a specific purpose
const analytics = window.__tp.getConsent("analytics");

// Listen for consent changes
window.__tp.onConsentChange((prefs) => {
  console.log("Consent updated:", prefs);
});