Free cookie collection notification script for websites from Qform

For modern websites, notification of cookie collection solves several tasks at once: compliance with legislation, increasing user trust, and improving search engine optimization (SEO).

Cookies allow the site to "remember" the user — his actions, preferences, and browsing history. This is important for analytics, personalization, marketing tools, and even for the operation of the shopping cart in an online store. But to collect such data, transparent notification is necessary, especially from the point of view of the law. In Russia, this is regulated by Federal Law No. 152-FZ "On Personal Data", which requires the user's consent to process any information that allows identification.

 

However, the value of a cookie banner goes far beyond the legal requirements. Its presence on the site has a direct impact on SEO. Search engines, especially Google, are actively developing the principles of user-first and data transparency. Algorithms are increasingly evaluating the quality of the user experience in terms of security and openness of working with personal data. The absence of a banner can be perceived as a risk factor, especially if the site uses analytics and third—party pixels. In the future, this may negatively affect the ranking of the resource in search engines.

QForm offers the simplest and most effective solution — a ready-made cookie notification script that can be embedded on a website with a single line of code. It automatically adds a neat, adaptive pop-up window to the page with legally correct text and the ability to provide a link to the privacy policy. This allows website owners to quickly adapt to the requirements of the law and at the same time show their openness and concern for users. No complicated settings, third—party plugins or programming - everything is implemented quickly, flexibly and taking into account the best practices of UX and SEO.

A ready—made solution from QForm is a cookie notification script

The QForm platform has developed a universal and free cookie notification script that can be embedded on a website in just a minute. The solution is intended for developers and website owners without technical education. You don't need to understand complex APIs or write your own notifications from scratch. All that is required is to insert one line of code into the website template.

The main advantages of the script 

➔ Minimum action — maximum benefit

Adding a cookie banner requires only one line of code. This is an ideal option if you want to comply with the requirements of the law quickly and without involving a programmer.

➔ Compliance with legal requirements

The script complies with the requirements of Law No. 152-FZ "On Personal Data" and other regulations. The text of the notification includes a mention of cookies, the possibility of opt-out, as well as a direct link to the privacy policy, as required by law.

➔ Flexibility and brand customization

Unlike rigidly fixed solutions, the script from QForm allows you to customize the appearance of the banner to match the corporate identity of the site. You can change the color of the background, buttons, and text, select the position of the appearance (bottom, top, or corner), and set your own text and link.

➔ Demonstration of the standard view

When installed without additional settings, the banner is displayed in a concise form with a neutral design suitable for most sites. It does not close the content or interfere with the user experience, while correctly informing about the collection of cookies.

This solution is convenient because it does not require the installation of third-party plugins or registration in the service. You simply post the code on the website and receive a fully functioning notification, ready to work on any device.

How to insert a cookie script on a website

It takes a couple of minutes to connect a banner from QForm and does not require any special knowledge in the field of web development. All you need to do is insert the finished code snippet into the website template.

Step 1: Where to insert the script

The cookie notification script is placed before the closing <body> tag. This ensures that the banner loads immediately when the page is opened and is visible to the user before interacting with the site. This approach complies with legal requirements and improves the user experience.

Simple connection option

If the standard layout and default text are enough for you, just paste the following code:

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



The script will automatically display a banner at the bottom of the screen with a neutral design and standard text. This option is sufficient for a quick launch and basic compliance with notification requirements.

An example with custom settings

If you want to adapt the appearance of the banner to the corporate identity of the site or change the text of the notification, add a configuration object before the activation script. Below is an example with comments:

<script>
    window.qformCookieSettings = {
        backgroundColor: '#f9f9f9',         // Banner background color
        buttonColor: '#28a745',             // "Accept" button color
        shadowColor: '#ccc',                // Shadow color
        fontSize: '14px',                   // Font size
        lineHeight: '100%',                 // Line height
        position: 'bottom',                 // Banner position on screen
        messageText: 'We process cookies to make the site more convenient to use. You can disable cookie processing in your browser settings. Please review our',
        policyText: 'Privacy Policy',       // Link text
        privacyLink: 'https://yoursite.com/privacy', // Policy URL
        cookieExpiryDays: 30                // Consent storage period, in days
    };
</script>

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

You can change any parameter: the color scheme, the location, the texts, or the validity period of the consent. This allows you to fine-tune the behavior and appearance of the banner for the specific tasks of your project or brand.

Script settings: what parameters can be changed

The cookie notification script from QForm is flexibly configurable — you can adapt the banner to the visual style of your site and the requirements of your audience.
The available parameters and examples of their use are described below.

Background Color

Determines the background color of the banner. Choose it so that it fits seamlessly into the website design.

Examples:

backgroundColor: '#ffffff'   // White — a classic for light interfaces  
backgroundColor: '#000000'   // Black — for dark themes or minimalist brands  
backgroundColor: '#f5f5f5'   // Light gray — neutral and unobtrusive  
backgroundColor: '#ffefd5'   // Sand — cozy, warm aesthetic  
backgroundColor: '#003366'   // Navy blue — corporate, trustworthy

Button Color

Responsible for the color of the "Accept" button. It should be noticeable, but not out of line with the overall style of the site.

Examples:

buttonColor: '#007bff'   // Bootstrap-style blue  
buttonColor: '#28a745'   // Green — associated with approval and trust  
buttonColor: '#ffc107'   // Yellow — neutral accent  
buttonColor: '#6c757d'   // Gray — for minimalist designs  
buttonColor: '#e83e8c'   // Pink — creative and attention-grabbing

Notification Text (message Text)

The main message displayed in the banner. It should be clear and informative.

Example:

messageText: 'We use cookies to improve your experience. Learn more in our'

Link text (policyText) and address (privacyLink)

Define the name and link to the privacy policy page.

Example:

policyText: 'Privacy Policy',
privacyLink: 'https://mysite.ru/privacy'

Consent period (cookieExpiryDays)

After accepting the user's consent, the banner will not be displayed for the specified number of days.

Example:

cookieExpiryDays: 30  // Consent is stored for 30 days

Banner position (position)

You can choose exactly where the banner will appear. Positions are available:

'top'
'bottom'
'bottom-left'
'bottom-right'
'top-left'
'top-right'

Example:

position: 'bottom-right'

Additional parameters

  • fontSize: text size (for example, '14px')
  • line Height: line spacing (for example, '120%')
  • shadowColor: the color of the shadow around the banner

All parameters can be combined. This allows you to create a notification that fully corresponds to the style of your site and the requirements of the law, without sacrificing user convenience.

Examples of ready-made themes for a cookie banner

1. Dark Theme / Dark UI

It is ideal for websites with a dark interface or night mode.

<script>
window.qformCookieSettings = {
    backgroundColor: '#1e1e1e',
    fontColor: '#ffffff',
    buttonColor: '#007bff',
    shadowColor: '#000000',
    fontSize: '14px',
    lineHeight: '130%',
    position: 'bottom-right',
    messageText: 'We use cookies to improve website functionality. Learn more in our',
    policyText: 'Privacy Policy',
    privacyLink: 'https://yourdomain.ru/privacy',
    cookieExpiryDays: 30
};
</script>

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

2. Light theme / Light UI

It is suitable for websites with a clean, minimalistic design and a white background.

<script>
window.qformCookieSettings = {
    backgroundColor: '#ffffff',
    fontColor: '#333333',
    buttonColor: '#28a745',
    shadowColor: '#ccc',
    fontSize: '14px',
    lineHeight: '120%',
    position: 'bottom',
    messageText: 'We use cookies to enhance your user experience.',
    policyText: 'Learn more in our policy',
    privacyLink: 'https://yourdomain.ru/privacy',
    cookieExpiryDays: 60
};
</script>

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

3. Corporate style / Business Classic

For corporate websites, B2B projects, banks and legal resources.

<script>
window.qformCookieSettings = {
    backgroundColor: '#f5f5f5',
    fontColor: '#003366',
    buttonColor: '#0056b3',
    shadowColor: '#999999',
    fontSize: '15px',
    lineHeight: '130%',
    position: 'top',
    messageText: 'This website uses cookies for analytics and security purposes.',
    policyText: 'Learn more',
    privacyLink: 'https://yourdomain.ru/privacy',
    cookieExpiryDays: 90
};
</script>

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

Minimalism / Clean & Neutral

Simple and unobtrusive design that does not distract the user's attention.

<script>
window.qformCookieSettings = {
    backgroundColor: '#f9f9f9',
    fontColor: '#6c757d',
    buttonColor: '#6c757d',
    shadowColor: 'transparent',
    fontSize: '13px',
    lineHeight: '110%',
    position: 'bottom-left',
    messageText: 'We use cookies. See details in our',
    policyText: 'privacy policy',
    privacyLink: 'https://yourdomain.ru/privacy',
    cookieExpiryDays: 7
};
</script>

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

A fast and legitimate solution for your website

If you want to bring your website into compliance with the requirements of the law on personal data quickly and without bureaucracy, the cookie notification script from QForm is the best option. It does not require complex configuration, is easy to implement, and ensures that users are correctly informed about data collection, which is especially important in the context of increased attention to digital security and transparency.

The simple syntax, flexible settings, and the ability to integrate into any website make the QForm script a convenient tool for both developers and business owners who need to maintain user trust and increase audience loyalty.

The script is absolutely free, does not require registration and is compatible with any CMS. Add just one line to comply with the legal requirements.

Try the cookie banner from QForm right now and see how easy it is to combine the law, UX and style.

We also recommend that you pay attention to other tools.:

  • Constructor of forms and quizzes;
  • Interactive video widgets for websites;
  • Ready-made solutions for lead generation and marketing.

With QForm, you don't just create forms — you build a full-fledged digital ecosystem that works for the growth of your business.