How to Use the GDPR Cookie Consent Generator

Our cookie consent generator is designed to be straightforward and easy to use. Follow these simple steps to create and implement a GDPR-compliant cookie banner for your website.

1

Customize Your Banner

On the homepage, scroll down to the "Customize Your Cookie Consent Banner" section. Adjust the following settings to match your website's needs and design:

  • Banner Position: Choose whether your banner appears at the top or bottom of your website.
  • Background Color: Select a color that complements your website's design.
  • Text Color: Choose a color that ensures text remains readable against your selected background.
  • Button Text: Customize the text for your "Accept" and "Reject" buttons.
  • Privacy Policy URL: Add the URL to your privacy policy page.
  • Banner Text: Edit the message displayed to visitors about your cookie usage.

As you make changes, the live preview will update automatically so you can see exactly how your banner will look.

2

Generate Your Code

Once you're satisfied with your banner's appearance and content, click the "Generate Code" button. This will create the HTML, CSS, and JavaScript code needed to implement your cookie consent banner.

The generated code will appear in the box below the button. It includes everything needed to:

  • Display your customized banner
  • Store the user's consent choice in a cookie
  • Hide the banner once the user has made a choice
  • Respect the user's previous choice when they return to your site
3

Copy the Code

Click the "Copy to Clipboard" button to copy all the generated code. A confirmation message will appear once the code has been successfully copied.

4

Implement the Code on Your Website

The final step is to add the code to your website:

  1. Access your website's HTML code (through your CMS, website builder, or by directly editing your HTML files).
  2. Paste the copied code just before the closing </body> tag of your website.

Here's an example of where the code should be placed:

<html>
  <head>
    <!-- Your head content -->
  </head>
  <body>
    <!-- Your website content -->
    
    <!-- Paste the generated cookie consent code here -->
  </body>
</html>
5

Test Your Implementation

After adding the code to your website, visit your site in a browser and check that:

  • The cookie banner appears correctly
  • The "Accept" and "Reject" buttons work as expected
  • The banner disappears after making a choice
  • The banner doesn't reappear when you refresh the page (as your choice is now stored in a cookie)

If you want to test the banner again, you'll need to clear your browser cookies for your website.

Frequently Asked Questions

Is this banner fully GDPR compliant?

Our generator creates a basic cookie consent mechanism that helps with GDPR compliance. However, full GDPR compliance involves many aspects of your website and business operations. For comprehensive compliance, consult with a legal professional specializing in data protection.

Will this banner affect my website's performance?

No, the generated code is lightweight and optimized for performance. It doesn't rely on any external libraries and has minimal impact on your website's loading time.

Can I further customize the banner after generating the code?

Yes! The generated code can be modified to fit your specific needs. If you have HTML and CSS knowledge, you can adjust the styling, positioning, and behavior of the banner by editing the code.

What happens when a user clicks "Reject"?

When a user clicks "Reject," the banner sets a cookie recording their preference and then disappears. The provided code includes a placeholder in the JavaScript where you can add your own logic to disable non-essential cookies or tracking scripts when users reject cookies.

How long does the user's choice last?

By default, the cookie storing the user's consent choice expires after 6 months. You can modify this duration by editing the expiry date in the JavaScript code.

Does this work with Content Management Systems (CMS) like WordPress?

Yes, the generated code can be added to any HTML-based website, including sites built with WordPress, Wix, Squarespace, and other popular CMS platforms. For WordPress specifically, you can add the code to your theme's footer.php file or use a plugin that allows custom HTML/JavaScript insertion.

Need Additional Help?

If you're having trouble implementing the code or have questions about using our tool, feel free to contact me at support@gdprcookieconsentgenerator.com. I'm happy to help!