If you’ve ever been met with blank stares or confusion when asking “What’s our consent rate?” you’re not alone. Most marketers know that cookie banners are important for privacy compliance, but few know how to actually access the data behind them.
It’s not just about whether the banner shows up. It’s about what happens next: how many users accept, how many decline, and how those rates vary across time, country, or device.
These metrics are critical for understanding your actual audience visibility. The problem is that they’re often hidden away in platforms like Cookiebot CMP, where often only technical teams or compliance officers know how to find them.
This guide changes that. In this tutorial, you’ll learn how to extract all consent data you need from Cookiebot™ using their API, and how to turn it into a clear visual dashboard your entire marketing team can use.
But more importantly, it shows you how this data can drive better decision-making, stronger privacy practices, and deeper user trust.
Why this matters (for you and your users)
You can’t improve what you can’t measure. If 25–40 percent of your users are declining consent, you’re not just facing a privacy challenge; you’re facing a serious data quality issue.
Without their consent, these users disappear from your analytics tools, like GA4, Mixpanel, or Piwik Pro, which skews your insights and limits your ability to make informed decisions.
By accessing and analyzing this data, you can monitor real consent rates across your site, pinpoint underperforming banners or pages, run tests to improve opt-in rates, and benchmark performance across countries, devices, or client sites.
Most importantly, you can finally make this critical data visible to the people who need it: marketing, product, and compliance teams. That means everyone is working from the same source of truth.
What you’ll need
To follow this tutorial, you’ll need:
- Access to a Cookiebot account (with API permissions)
- A basic understanding of APIs
- A place to store/query the data (e.g. BigQuery)
- A visualization tool like Looker Studio, Tableau, or PowerBI
How we extract consent data from Cookiebot™
Cookiebot provides a Consent Statistics API that allows us to programmatically retrieve daily user consent activity across all our web domains. This includes detailed metrics like opt-in/opt-out counts, implied consent, and even geographic breakdowns by country.
These insights are essential for tracking user behavior, optimizing consent design, and ensuring compliance with data privacy regulations like GDPR and CCPA.
From manual downloads to automated reporting
Traditionally, this data was accessible from the Consents section in the Cookiebot Manager UI, where you could export CSV files. However, managing multiple domains and cultures (languages) across different domain groups quickly becomes cumbersome.
To address this, we developed an automated Python-based solution that:
- Loops through all our configured domain groups, domains, and cultures (e.g., English and Arabic)
- Calls the Cookiebot Consent Statistics API for each combination
- Extracts the daily metrics and loads them directly into a centralized BigQuery table
- Handles API failures gracefully, skipping missing cultures or temporarily unavailable domains
- Avoids exposing sensitive information by keeping credentials in environment variables and a config file
This solution provides a scalable way to continuously monitor consent data across global web properties without manual effort.
GitLab repository
You can find the full solution in our internal GitLab repository: https://gitlab.com/datalemon-general/cookiebot

- fetch_consent_stats.py is the main script responsible for collecting the consent data.
- domains_config.py defines which domains and cultures to process.
- .env (not tracked by Git) is used to securely store credentials like your BigQuery project ID and dataset name.
The scripts are designed with security in mind and do not expose any API keys or client secrets in the codebase.
Benefits of the automated solution
- Always up to date: Automatically refreshes with the latest daily data
- Centralized visibility: Easily monitor opt-in rates per domain, per country, and per culture
- Scalable: Supports adding new domains or languages with minimal config updates
- Secure: Credentials and config are handled through .env and a config file

The data extracted by making this call is the same data that can be found under the Consents section in the Cookiebot Manager. It’s also available for download from your Cookiebot account.
How to visualize your data with BigQuery and Looker Studio
This quick guide shows you how to pull Cookiebot data into BigQuery and visualize it with Looker Studio.
- Retrieve the code from the repository
- Get the API key and domain group ID from your Cookiebot account (under Settings >-> Your Scripts)
- Use it in BigQuery to pull data from Cookiebot
- Once the data is in BigQuery, duplicate the Looker Studio template
- Connect your data from BigQuery to Looker Studio

What to do with Cookiebot™ data
Once your consent data is visualized and accessible, it becomes a powerful tool for continuous optimization. Start by using it to improve your cookie banner performance. Small changes like switching to a full-screen layout or adjusting placement can significantly boost opt-in rates.
In fact, we’ve seen some large sites achieve consent rates of 90 percent or higher with these adjustments. You can also run A/B tests on banner language and design to see what resonates best with users. Use regional benchmarks to identify where consent rates are lagging, especially in GDPR-heavy markets where users may be more cautious.
And remember: consent isn’t a one-and-done task. It needs to be monitored continuously and optimized over time as both regulations and user expectations continue to evolve.
Final Thoughts
Consent data isn’t just useful for checking a compliance box. It’s a strategic asset. By making it visible and actionable, you empower your teams to make smarter decisions, protect user trust, and stay ahead of evolving privacy expectations.
Whether you’re a solo marketer or managing dozens of client sites, building a consent dashboard with Cookiebot data is one of the most valuable — and underused — moves you can make.