How to Post Cookies Message on Your Website?

How to Post Cookies Message on Your Website
How to Post Cookies Message on Your Website

Cookies message; If you intend to create a website or a blog, you must add a cookie message to inform you about using this feature. It is necessary to comply with a determination of the LGPD — General Data Protection Law —, which aims to ensure security and privacy in the use of personal information collected by companies.

In practice, the law determines a series of rules and best practices for handling this information. One of them is the need for the user to give consent when a company or website collects their personal and sensitive data. As cookies can store information capable of identifying the user, such as login, email, etc., there is a need to request consent.

What are cookies message on the website?

Cookies are small text-format files created by websites stored on the user’s device (notebooks, tablets, or smartphones) when the condition to allow the storage of cookies is enabled in the browser.

When you enter a website, and the browser asks if you want to store the access password, do you know? If the answer is yes, The cookie will hold your login data.

They are also used to understand what the person is looking for on the page. On e-commerce sites, for example, they are a powerful tool for the store to send product suggestions according to what the consumer is looking for.

Most websites use this feature because they store information that helps companies understand user behavior on the page. These include the length of stay, links clicked, choices about customizing the environment, and much more.

What types of websites need to use message cookies?

As mentioned, LGPD requires the user’s consent for any resource that collects personal and sensitive information. In addition, there is the GDPR (General Data Protection Regulation or General Data Protection Regulation), which, despite being a legislation of the European Union, affects websites that receive visitors from these locations, as it requires consent to use cookies.

Thus, the ideal is that any website that uses cookies displays a message requesting consent from users. So if you plan to create a blog or a website, you should use this feature. Thus, it will comply with European law.

There are different ways to display the cookie message on the website. Check out the main formats below.

Generally, the footer region contains essential information about the page, such as links to the company presentation and other relevant pointers. Therefore, many websites maintain the warning of cookies in this region.

The message displayed right in the header of the page draws a lot of the user’s attention. A dialog box with the necessary information is shown in practice, which will be closed as soon as the person interacts with it.

The slider message can be displayed at different points on the screen and is superimposed on the content until the person consents to cookies’ storage.


In addition to these formats presented, we can use creativity to insert the message in different ways, including:

  • in floating bar format;
  • just a minimalist message;
  • on a banner with an image.

There are different ways to add the cookie message to the website. If it’s WordPress, for example, there are several plugins on the internet that can help with this task. In addition, there are online tools that generate a code snippet to be inserted into the page. Check out these two ways below.

Use WordPress plugin

One of the available alternatives is the Getsitecontrol plugin, which offers a paid version but a 15-day trial period. In this way, it is possible to assess whether the features provided meet the site’s needs.

  1. Its use is straightforward. Just install the plugin like any other. First, however, you must create an account for its use.
  2. Next; select the URL where the message will be inserted and click the “Go to Dashboard” button.
  3. You will be redirected to the Getsitecontrol platform; which contains all the resources for creating the banner with the alert message. Next, click on the “Create Widget” button.
  4. Note that there are several templates on the right side of the screen that we can choose from.
  5. However, the models available are of the form type, which does not correspond to our objective.
  6. Therefore, click on the “Form” button and select the “Message” option. After choosing a template, click on the top “Continue” button.
Cookies Message: Use WordPress plugin

See that there are several options available in the tool to perform different configurations, such as defining the placement of the banner, choosing the theme (dark or light), and viewing the CSS code. In addition, there are four tabs at the top, on which there are other additional features.

  1. Click on the “Size and spacing” option, located on the right side of the screen, to set the banner size.
  2. To edit the banner title, click on the text box on the dashboard and type the desired message on the right side of the screen.
  3. The same must be done to edit the content of the message to be displayed.
  4. Now, let’s edit the content of the buttons. To do this, click on it and fill in the required fields.
  5. Note that, in the original template, there is only one button available. However, we can add another one. To do this, click on the “Close” option at the top right of the screen (to close another active configuration).
  6. Then click on the “Add new button” option and make the adjustments for the new button. Finally, click on the “Save & Close” button.
  7. We’re back to the tool’s dashboard. Note that there is a banner created and a message to enable or keep the flag off. Click on the “Active now” option to activate the feature.
  8. Done, the message will be displayed on the website whenever it loads.

Edit source code

Cookies Message

It is also possible to add the message by including a source code generated by online tools that make this feature available. One of them is the TermsFeed website, which provides the Cookie Consent Solution tool.

However, the ideal is that a person with knowledge in web development does this alternative, as any undue code change can compromise the site’s operation. See the step-by-step.

When accessing the tool’s link, display the page shown in the image below. Fill in the required fields as needed.

Note that you can choose between the consent template. On the right side of the screen, and displays the result of each choice. You also need to configure:

  • website address;
  • choose the banner template;
  • and choose between dark or light theme;
  • choose the language used on the website;
  • provide the link to the privacy policy page, if applicable.
  1. Below is a text box with the source code ready to copy and paste into the site. Click the “Copy to clipboard” button.
  2. To include this code on the website, choose “Appearance”> “Theme Editor” in the WordPress dashboard.
  3. Attention, looking for the “Header.php” file among the “Theme Files” listed on the right side of the screen. Click on it so that the source code displays in the code editor. Then, paste the copied code on the first line after the “<head>” tag.
  4. Click on the “Update File” button located at the bottom of the page. 
  5. Okay, you can check the feature working in the header of the website.

Why is it important?

Cookies Message

There is currently a constant concern regarding the use of personal data of people who surf the internet. Therefore, there are laws in force on the subject, such as the LGPD and the GDPR. 

Therefore, using the cookie message on the website is critical to comply with these laws and avoid punishment, such as paying fines, among others provided for in the legislation.

However, just displaying the cookie message is not enough to ensure that the website offers adequate protection for the data used by the cookie. 

Please note that you must host through a provider that offers a secure environment, such as Rock Content’s Stage offerings. In addition to using SSL protocol, the server is constantly checking for protection routines.

Displaying the cookie message on the website is a necessary action for pages that use this feature. There are different ways to do this, such as using WordPress plugins or editing the source code. 

In addition, the website must ensure adequate protection for the data collected. Therefore, he must stay in a secure environment.

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts