Integrations
Install CookieFrame on your website using various integration methods
Integrations
Choose how to add CookieFrame to your website. We offer multiple integration options to fit your setup.
Google Tag Manager (Recommended)
For websites already using Google Tag Manager, this is the recommended integration method. It includes built-in Google Consent Mode v2 support.
View full GTM integration guide →
Manual Installation
For developers who want full control or don't use GTM. Add a single script tag to your HTML and optionally interact with consent via JavaScript.
Quick start:
<script src="https://cookieframe.com/api/widget/YOUR_DOMAIN_ID/script.js" async></script>View full manual installation guide →
The manual installation guide covers:
- Script placement and loading options
- Complete JavaScript API reference
- Event handling for consent changes
- Conditional script loading patterns
- Google Consent Mode v2 integration
- Single-page application (SPA) support
- Server-side rendering (SSR) frameworks
- Troubleshooting
WordPress Plugin
Install our official WordPress plugin for automatic integration. No coding required — connect your domain from the plugin settings and the banner goes live.
View full WordPress integration guide →
Cookie Preferences Link
GDPR and other privacy regulations require you to allow users to change their cookie preferences at any time. Add a "Cookie Preferences" link to your footer or privacy page.
Implementation Options
Option 1: Data Attribute (Recommended)
Add the data-cookieframe="preferences" attribute to any element:
<a href="#" data-cookieframe="preferences">Cookie Preferences</a>Option 2: JavaScript API
<a href="#" onclick="window.CookieFrame && window.CookieFrame.showPreferences(); return false;">
Cookie Preferences
</a>Option 3: Queue-Based (Race Condition Safe)
<a href="#" id="cookie-prefs">Cookie Preferences</a>
<script>
document.getElementById('cookie-prefs').addEventListener('click', function(e) {
e.preventDefault();
if (window.CookieFrame) {
window.CookieFrame.showPreferences();
} else {
window.CookieFrameQueue = window.CookieFrameQueue || [];
window.CookieFrameQueue.push(function(w) { w.showPreferences(); });
}
});
</script>The CookieFrame widget must be installed on the same page. The preferences link only works on pages where the script is loaded.
For more details on the JavaScript API, see the manual installation guide.
Need Help?
If you're having trouble with installation, email us at [email protected].