GDPRChecker

Home / Knowledge Base / Can CookieYes Be Implemented on a Custom Coded Website: A Practical Guide

Website Compliance

Can CookieYes Be Implemented on a Custom Coded Website: A Practical Guide

A practical guide on implementing CookieYes on a custom coded website for GDPR compliance, covering step-by-step integration, common mistakes, validation with GDPRChecker, and a detailed FAQ.

Author

GDPRChecker Editorial Team

Reviewed by

Privacy & Compliance Research Team

Last updated

August 2026

Reading time

13 min read

Educational guidance for compliance readiness — not legal advice. Requirements vary by jurisdiction and your specific processing activities.

Introduction

*Updated for 2026 compliance practices.*

If you run a custom coded website, you might wonder: can CookieYes be implemented on a custom coded website? The short answer is yes. CookieYes provides a JavaScript-based consent management platform (CMP) that can be integrated into any website, regardless of whether it's built with a CMS like WordPress or hand-coded from scratch. This guide walks you through the practical steps, requirements, and verification methods to ensure your custom site meets GDPR consent standards using CookieYes. We'll also show you how to validate your setup with GDPRChecker's scanner to catch pre-consent network requests, banner behavior, and disclosure gaps.

What is Can CookieYes Be Implemented on a Custom Coded Website: A Practical?

Can CookieYes Be Implemented on a Custom Coded Website: A Practical is the practical process a website owner uses to document, check, and improve the relevant consent or privacy controls. In this guide, it means keeping evidence that can show what visitors were told, which choices they made, and how tracking behavior matched those choices at the time of a review.

What Does "Can CookieYes Be Implemented on a Custom Coded Website" Mean for Website Owners?

For website owners, the question "can CookieYes be implemented on a custom coded website" is about whether a consent management tool can work without a plugin ecosystem. CookieYes operates by injecting a script that manages cookie consent banners, blocks cookies before consent, and records user preferences. On a custom coded site, you manually add the CookieYes script to your HTML, configure cookie categories, and adjust your own scripts (like Google Analytics or Facebook Pixel) to respect consent choices. This hands-on approach gives you full control but requires careful implementation to avoid common pitfalls like firing tags before consent.

From a compliance perspective, implementing CookieYes on a custom site means you must ensure that all cookies and trackers are correctly categorized, that the consent banner appears before any non-essential cookies are set, and that users can withdraw consent easily. The GDPR requires that consent be freely given, specific, informed, and unambiguous. CookieYes helps meet these requirements by providing a customizable banner and consent log, but the technical integration is your responsibility.

Requirements and Compliance Expectations

Before diving into the implementation, it's crucial to understand the compliance landscape. The GDPR, as outlined by the European Data Protection Board, mandates that websites obtain prior consent for non-essential cookies and trackers. This means your custom coded website must:

  • Display a cookie consent banner that blocks non-essential cookies until the user makes a choice.
  • Provide clear information about each cookie's purpose, duration, and provider.
  • Offer a "Reject All" option that is as easy to use as "Accept All."
  • Keep a record of consent (consent log) as proof of compliance.
  • Allow users to change their consent preferences at any time.

CookieYes supports these requirements by offering a script that you can embed directly into your site's `<head>` section. However, you must also configure your own scripts to respect the consent state. For example, if you use Google Analytics 4 (GA4), you need to integrate it with Google Consent Mode v2, which adjusts how Google tags behave based on consent. The Google Consent Mode documentation explains how to set default consent states and update them when the user interacts with the banner.

Additionally, your privacy policy must be up-to-date and linked from the banner. For guidance on crafting a compliant privacy policy, see our privacy policy requirements guide. Remember, this guide provides technical implementation advice, not legal counsel. Always consult with a legal professional for jurisdiction-specific requirements.

How to Implement CookieYes on a Custom Coded Website Step by Step

Implementing CookieYes on a custom coded website involves several key steps. Follow this sequence to ensure a smooth integration.

Step 1: Sign Up and Get Your CookieYes Script

Create an account on CookieYes and generate your unique installation script. This script is a JavaScript snippet that loads the consent banner and manages cookie blocking. It typically looks like:

```html <script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/your_unique_id/script.js"></script> ```

Step 2: Add the Script to Your Website's <head>

Place the CookieYes script as high as possible in the `<head>` section of every page. This ensures the banner loads before other scripts that might set cookies. For a custom coded site, you'll edit your HTML template or include the script via a server-side include.

Step 3: Configure Cookie Categories in CookieYes Dashboard

Log into your CookieYes dashboard and define the cookie categories you use: necessary, functional, analytics, performance, advertisement, and others. For each category, list the specific cookies your site sets. This information will appear in the consent banner's detail view, helping users make informed choices.

Step 4: Adjust Your Custom Scripts to Respect Consent

This is the most critical part. Any script that sets non-essential cookies must be modified to check the consent state before executing. CookieYes provides a JavaScript API that you can use to conditionally load scripts. For example:

```javascript window.addEventListener('cookieyes_consent_update', function (event) { const consentData = event.detail; if (consentData.accepted.includes('analytics')) { // Load Google Analytics var gaScript = document.createElement('script'); gaScript.src = 'https://www.googletagmanager.com/gtag/js?id=GA_MEASUREMENT_ID'; document.head.appendChild(gaScript); window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'GA_MEASUREMENT_ID'); } }); ```

Alternatively, you can use Google Tag Manager (GTM) and configure triggers based on consent. If you use GTM, set up a custom event trigger that fires when consent is granted. For more on GTM and consent, read our guide on consent mode v2 vs Google certified CMP.

Step 5: Implement Google Consent Mode v2 (If Using Google Services)

If your site uses Google Analytics, Google Ads, or other Google services, you must implement Consent Mode v2 to comply with Google's EU user consent policy. Add the following code before your GTM or gtag script:

```javascript window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('consent', 'default', { 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'analytics_storage': 'denied' }); ```

Then, update the consent state when the user makes a choice. CookieYes can integrate with Consent Mode v2 automatically if you enable the integration in the dashboard. Verify that the consent update is sent correctly using the GA4 consent mode guide.

Step 6: Test the Reject Flow

Many implementations fail because the "Reject All" button doesn't actually block cookies. Test this by opening your site in an incognito window, clicking "Reject All," and checking that no analytics or advertising cookies are set. Use browser developer tools (Application > Cookies) to verify.

Step 7: Add a Consent Preferences Link

Place a link or button on your site (often in the footer) that allows users to reopen the consent banner and change their preferences. CookieYes provides a JavaScript function for this: `revisitCkyConsent()`. Attach it to an element's onclick event.

Common Mistakes and How to Avoid Them

Even with a tool like CookieYes, custom coded websites often fall into these traps:

1. Scripts Firing Before Consent

This is the most common issue. If your analytics or marketing scripts are hardcoded in the `<head>` without a consent check, they'll fire immediately, violating GDPR. Always wrap non-essential scripts in a consent condition or use a tag manager with consent triggers.

2. Incomplete Cookie Declaration

Your cookie banner must list all cookies your site uses. If you add a new third-party service (e.g., a live chat widget), update your CookieYes dashboard accordingly. An incomplete list can lead to non-compliance.

3. Ignoring Consent Mode v2 for Google Services

If you use any Google service that processes personal data, you must implement Consent Mode v2. Without it, Google may not serve ads or collect analytics data for EEA users. This is a technical requirement, not just a best practice.

4. Broken Reject Button

Some implementations only hide the banner on reject but don't actually block cookies. Always test the reject flow thoroughly. Use GDPRChecker's scanner to confirm that no non-essential network requests occur after rejection.

5. Not Keeping Consent Logs

CookieYes automatically maintains a consent log, but you should periodically download and store these records securely. They serve as evidence of compliance if challenged by a data protection authority.

How to Validate Your Implementation with GDPRChecker

After implementing CookieYes, you need to verify that everything works as expected. GDPRChecker's public scanner can help you catch issues that manual testing might miss. Here's how:

  1. **Run a Free Scan**: Visit GDPRChecker and enter your website URL. The scanner will check for the presence of a consent banner, cookie disclosures, and pre-consent network requests.
  2. **Check Pre-Consent Requests**: The scanner identifies any cookies or trackers that load before the user interacts with the banner. If any are found, you'll need to adjust your script loading logic.
  3. **Verify Banner Behavior**: Ensure the banner appears on the first page load and that the "Reject All" option works. The scanner can simulate a rejection and confirm that no non-essential cookies are set.
  4. **Review the Report**: GDPRChecker provides a detailed report highlighting gaps in your consent setup. Use this to fine-tune your CookieYes configuration.

For ongoing monitoring, consider a paid plan that offers runtime protection and consent records. This is especially useful for custom coded sites where changes can inadvertently break compliance. Learn more about general GDPR requirements in our GDPR requirements for websites guide.

Comparison: CookieYes on Custom Coded vs CMS Websites

| Aspect | Custom Coded Website | CMS Website (e.g., WordPress) | |--------|----------------------|-------------------------------| | **Script Integration** | Manual insertion into HTML | Plugin handles script placement | | **Cookie Blocking** | Must manually wrap scripts with consent checks | Plugin often auto-blocks known scripts | | **Consent Mode v2** | Requires manual code for default and update | Plugin may offer a toggle or automatic integration | | **Flexibility** | Full control over implementation | Limited by plugin capabilities | | **Maintenance** | Higher; you must update scripts when services change | Lower; plugin updates may handle changes | | **Risk of Errors** | Higher if not thoroughly tested | Lower, but plugin conflicts can occur |

As the table shows, custom coded sites demand more technical diligence. However, they also allow for a more tailored consent experience. For a step-by-step guide on adding a cookie banner to any site, see our how to add cookie banner to website guide.

Real-World Examples

Example 1: E-commerce Site with Multiple Trackers

A custom coded e-commerce site uses Google Analytics, Facebook Pixel, and a live chat widget. After implementing CookieYes, the owner configured the analytics and advertisement categories to block these scripts by default. On the first visit, only necessary cookies load. When the user accepts analytics, the GA4 script fires; when they accept advertisement, the Facebook Pixel loads. The live chat widget is set to functional cookies and loads only if that category is accepted. GDPRChecker's scan confirmed zero pre-consent requests.

Example 2: SaaS Landing Page with GTM

A SaaS company built a landing page with a custom HTML framework and Google Tag Manager. They added the CookieYes script and configured GTM to fire tags only on a custom event `cookieyes_consent_update`. They also implemented Consent Mode v2 by setting default denied states and updating them via GTM. Testing with GDPRChecker revealed that one tag was still firing due to a misconfigured trigger. After fixing it, the scan passed.

Example 3: Blog with Minimal Cookies

A personal blog running on a static site generator used CookieYes to manage a single analytics cookie. The owner added the script to the `<head>` and wrapped the analytics code in a consent check. The reject flow was tested and worked correctly. GDPRChecker's scan confirmed compliance, and the owner now runs monthly scans to ensure no new cookies appear.

Implementation Checklist

Before considering your CookieYes implementation complete, work through this checklist:

  1. CookieYes script is placed in the `<head>` of every page.
  2. All cookies are categorized in the CookieYes dashboard.
  3. Non-essential scripts are wrapped with consent checks or loaded via GTM with consent triggers.
  4. Google Consent Mode v2 default and update commands are implemented (if using Google services).
  5. The consent banner appears on first visit and blocks non-essential cookies.
  6. "Reject All" button actually prevents non-essential cookies from being set.
  7. "Accept All" button enables all consented categories.
  8. A "Cookie Settings" link or button allows users to reopen the banner.
  9. Privacy policy is linked from the banner and is up-to-date.
  10. Consent logs are being recorded and can be exported.
  11. A GDPRChecker scan shows no pre-consent network requests.
  12. The implementation is tested across major browsers and devices.

FAQ

What is can cookieyes be implemented on a custom coded website? Can CookieYes be implemented on a custom coded website is a common question about whether the consent management platform works without a CMS. Yes, it can be implemented by manually adding the CookieYes JavaScript snippet to your site's HTML and configuring your scripts to respect consent choices. This approach gives you full control over compliance.

Do I need can cookieyes be implemented on a custom coded website for GDPR? If your custom coded website uses non-essential cookies or trackers and serves EU visitors, you need a consent management solution like CookieYes to comply with GDPR. The regulation requires prior consent for such cookies, and CookieYes helps you obtain and manage that consent effectively.

How do I implement can cookieyes be implemented on a custom coded website? To implement CookieYes on a custom coded website, sign up for an account, get your unique script, add it to the `<head>` of every page, configure cookie categories in the dashboard, and modify your own scripts to check consent before firing. Test thoroughly with browser tools and a scanner like GDPRChecker.

How can I verify can cookieyes be implemented on a custom coded website with a scanner? Use GDPRChecker's free scanner to verify your implementation. It checks for pre-consent network requests, banner presence, and cookie disclosures. Run a scan after setup and after any changes to ensure ongoing compliance. Paid plans offer deeper monitoring and consent records.

What are common can cookieyes be implemented on a custom coded website mistakes? Common mistakes include scripts firing before consent, incomplete cookie declarations, ignoring Google Consent Mode v2, a broken reject button, and not keeping consent logs. Always test your reject flow and use a scanner to catch hidden issues.

Which cookies and trackers should I check for can cookieyes be implemented on a custom coded website? Check all cookies and trackers your site uses, including analytics (e.g., Google Analytics), advertising (e.g., Facebook Pixel), functional (e.g., chat widgets), and any third-party embeds. Categorize them correctly in CookieYes and ensure they only load after appropriate consent.

How often should I review can cookieyes be implemented on a custom coded website? Review your CookieYes implementation at least quarterly or whenever you add new services, update scripts, or change your privacy policy. Regular GDPRChecker scans can alert you to new cookies or compliance drift, helping you maintain a valid setup.

What evidence should I keep for can cookieyes be implemented on a custom coded website? Keep consent logs from CookieYes, records of your cookie declarations, screenshots of your banner at different times, and GDPRChecker scan reports. These documents demonstrate your compliance efforts to data protection authorities if required.

Next Steps: Validate Your Setup with GDPRChecker

Now that you know can CookieYes be implemented on a custom coded website, it's time to ensure your implementation is airtight. Run a free scan with GDPRChecker to detect any pre-consent requests, banner issues, or disclosure gaps. For ongoing peace of mind, explore our paid plans that offer runtime monitoring and consent records. Also, review our GDPR checklist for small businesses to cover all compliance bases. Remember, technical implementation is just one part of GDPR compliance; a comprehensive approach includes a solid privacy policy and regular audits.

Next step

Run a GDPRChecker scan to validate consent behavior, trackers, and disclosures after you implement the checklist above.

> This guide is technical implementation guidance for website owners. It is not legal advice.

Article schema

```json { "@context": "https://schema.org", "@type": "Article", "headline": "Can CookieYes Be Implemented on a Custom Coded Website: A Practical Guide", "description": "Learn how to implement CookieYes on a custom coded website for GDPR compliance. Step-by-step guide, common mistakes, and validation with GDPRChecker scanner.", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://www.gdprchecker.online/guides/can-cookieyes-be-implemented-on-a-custom-coded-website" }, "publisher": { "@type": "Organization", "name": "GDPRChecker", "url": "https://www.gdprchecker.online" } } ```

GDPRChecker guides are educational resources and do not constitute legal advice. Use them to understand technical and operational privacy requirements, and consult qualified counsel for legal interpretation.

Check Your Website in Under 60 Seconds

  • No signup required
  • GDPR-focused checks
  • Cookie banner detection
  • Privacy policy verification