Cookie script for Wordpress: how to comply with legal requirements for free

WordPress is the most popular CMS in the world, but most sites on it still don't have a proper cookie collection notification. Meanwhile, legislation and search engines require webmasters to be transparent when processing personal data.

Cookie banner cookies are not just a check mark for the law

If you are a website owner, blogger, marketer, or just launching a WordPress landing page, you need a cookie banner.

That's why:

  • To comply with the law: according to 152-FZ, the user must be notified about the collection of personal data. Without this, there are risks of blocking and fines.
  • To build trust: transparency increases audience loyalty. People are more willing to interact with a site where their privacy is respected.
  • To improve SEO: Google and Yandex all pay more attention to the job site with the user data. The absence of a banner can affect the ranking.

Free cookie banner for wordpress from QForm

The QForm service has developed a simple and flexible cookie notification script that can be inserted into a website in one line. Without plugins, without registration, without linking to a specific WordPress theme.

Main advantages:

  • Free and unlimited.
  • It is easily embedded in any WordPress template.
  • Fully complies with the law.
  • Adapts to your style.

How to insert a cookie script

Step 1. Find the file footer.php your topic

Open it in the WordPress admin panel:

Appearance → Theme Editor → footer.php

Find the closing </body> tag and paste the following code in front of it:

html

<script src="https://cdn.qform.io/cookie/cookie-banner.js" async></script>

After saving, a standard banner will appear on the site.

Step 2 (optional). Customize the banner to fit your design

To customize colors, text, and behavior, add a block in front of the main script.:

html

<script>
    window.qformCookieSettings = {
        backgroundColor: '#ffffff',
        buttonColor: '#007bff',
        fontColor: '#000000',
        fontSize: '14px',
        position: 'bottom-right',
        messageText: 'We use cookies to improve the operation of the website. For more information, see',
        policyText: 'Privacy Policy',
        privacyLink: 'https://ваш_сайт.ru/privacy ',
        cookieExpiryDays: 30
    };
</script>
<script src="https://cdn.qform.io/cookie/cookie-banner.js" async></script>

Examples of design themes

Topic

The color palette

Suitable for websites

The Dark One

#1e1e1e / #ffffff / #007bff

blogs, IT projects

Bright

#ffffff / #333333 / #28a745

minimalism, portfolio

Corporate

#f5f5f5 / #003366 / #0056b3

B2B, finance, law

Minimalism

#f9f9f9 / #6c757d

landing pages, online stores

 

Why is QForm better than plugins

QForm

WordPress Plugins

Does not require installation

Requires a place in the admin area

Fast loading

May slow down the website

Flexible settings in the code

Often limited settings

Compatible with any theme

Possible conflicts

Free and unlimited

Often paid functionality

Conclusion

If you use WordPress and want to comply with the law, improve SEO and gain user trust, embed a cookie banner from QForm, which will take you less than 5 minutes. And all this is absolutely free.