Cookies

joaopeixoto
85 Posts
joaopeixoto posted this 2 weeks ago
Ask a Question

Hi. Merry Christmas. Hope all doing fine.

If I disable the unnecessary cookies, what happens in the background? If they are just empty clicks, what can I do to ensure the options chosen by clients are reflected? You have access to Google's cookie keys, so it should be easy for you to make the buttons work. However, I need clarification on this.

Additionally, all the software I tested shows a warning (critical in some cases) about the button in the cookies policy that doesn’t lead anywhere and has a placeholder name "#". I tested other websites with the same button and placeholder "#", and no warning is displayed on those websites. It seems Nicepage is doing something wrong with these popups. The software doesn’t detect this popup as a cookie bar but instead as a normal popup. It seems Nicepage is doing something wrong with these popups.

Hi. Merry Christmas. Hope all doing fine. If I disable the unnecessary cookies, what happens in the background? If they are just empty clicks, what can I do to ensure the options chosen by clients are reflected? You have access to Google's cookie keys, so it should be easy for you to make the buttons work. However, I need clarification on this. Additionally, all the software I tested shows a warning (critical in some cases) about the button in the cookies policy that doesn’t lead anywhere and has a placeholder name "#". I tested other websites with the same button and placeholder "#", and no warning is displayed on those websites. It seems Nicepage is doing something wrong with these popups. The software doesn’t detect this popup as a cookie bar but instead as a normal popup. It seems Nicepage is doing something wrong with these popups.

Last edited 2 weeks ago by joaopeixoto

Vote to pay developers attention to this features or issue.
4 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 2 weeks ago

Hello,

Please check the Cookie Popup documentation article:
https://nicepage.com/doc/98476/cookie-consent-popup
It should be helpful.
When you click the popup buttons (Confirm/Decline), the Nicepage script creates a corresponding cookie. To achieve a specific result on the button click, you can add a custom script to the site settings.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello, Please check the Cookie Popup documentation article: https://nicepage.com/doc/98476/cookie-consent-popup It should be helpful. When you click the popup buttons (Confirm/Decline), the Nicepage script creates a corresponding cookie. To achieve a specific result on the button click, you can add a custom script to the site settings. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
85 Posts
joaopeixoto posted this 2 weeks ago

Hi. I looked at that page before coming here to ask for clarification about cookies. That page is too vague. I really don't know what I need to do if someone presses the decline button. I only have Google Analytics that I inserted in the Nicepage for that. I also don't know what to do if someone selects only "strictly necessary" cookies. In your response I guess Nicepage take care of that for me, only If I need something different I would insert the code. but there is only code for acceptance button, not for decline.

Hi. I looked at that page before coming here to ask for clarification about cookies. That page is too vague. I really don't know what I need to do if someone presses the decline button. I only have Google Analytics that I inserted in the Nicepage for that. I also don't know what to do if someone selects only "strictly necessary" cookies. In your response I guess Nicepage take care of that for me, only If I need something different I would insert the code. but there is only code for acceptance button, not for decline.

Last edited 2 weeks ago by joaopeixoto

Support Team posted this 2 weeks ago

Hello João,

EU Cookies Popup Banner on your site informs each site visitor either or not they(visitors) allow collecting data (each visitor's data), or simply Confirm that your site will collect their data.
Your visitor may or may not agree to allow cookies. You can add your own script when the user accepts cookies consent, as this is a server-side task. If the user presses Decline button you do not need to do anything else or add any code. For example the contact form will not be submitted if the cookies are not accepted.
For Google Analytics, you can configure it to respect the user's choice by disabling tracking if consent is not provided.
Please check more about Google Analytics you are using online:
https://cookie-script.com/blog/google-analytics-cookies
https://www.cookiebot.com/en/google-analytics-gdpr/
...................................................
Sincerely,
Anna.
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hello João, EU Cookies Popup Banner on your site informs each site visitor either or not they(visitors) allow collecting data (each visitor's data), or simply Confirm that your site will collect their data. Your visitor may or may not agree to allow cookies. You can add your own script when the user accepts cookies consent, as this is a server-side task. If the user presses Decline button you do not need to do anything else or add any code. For example the contact form will not be submitted if the cookies are not accepted. For Google Analytics, you can configure it to respect the user's choice by disabling tracking if consent is not provided. Please check more about Google Analytics you are using online: https://cookie-script.com/blog/google-analytics-cookies https://www.cookiebot.com/en/google-analytics-gdpr/ ................................................... Sincerely, Anna. Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
joaopeixoto
85 Posts
joaopeixoto posted this 3 days ago

Hi. Happy new Year!

I tried to implement the banner with EU cookie consent. There are some things I am unsure about:

  1. How can I remove options from the checkbox list? I don't have any statistics code, and I don’t need form consent here because each form already has a consent box below it.

  2. I added values to my checkbox list, which I believe are read by the script I inserted into the designated area. Could you confirm if I did this correctly?

  3. For the confirm button, I linked it to #acceptButton. I’m not sure if this is necessary. Using just # causes problems with my SEO software. I assume I cannot insert a function directly into my script area because, when I click the button, I cannot choose which function it will call. So I inserted the content of the function directly into the script. Could you confirm if I did this correctly?

Here’s the code I inserted:

const necessary = true; // Sempre ativo
const analytics = document.querySelector("#analytics")?.checked || false;
const statistics = document.querySelector("#statistics")?.checked || false;
const forms = document.querySelector("#forms")?.checked || false;

const preferences = {
  necessary: necessary,
  analytics: analytics,
  statistics: statistics,
  forms: forms,
};

// Salvar preferências em um cookie
document.cookie = `cookiePreferences=${JSON.stringify(preferences)}; path=/; max-age=31536000`; // Expiração de 1 ano

// Configurar Google Analytics 4 (GA4)
if (analytics) {
  console.log("Google Analytics ativado.");

  // Carregar o script do gtag.js
  const script = document.createElement("script");
  script.src = "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"; // Substitua pelo seu Measurement ID
  script.async = true;
  document.head.appendChild(script);

  // Inicializar o GA4
  window.dataLayer = window.dataLayer || [];
  function gtag() {
    dataLayer.push(arguments);
  }
  gtag("js", new Date());
  gtag("config", "G-XXXXXXXXXX"); // Substitua pelo seu Measurement ID
} else {
  console.log("Google Analytics desativado.");
}

// Estatísticas adicionais (se aplicável)
if (statistics) {
  console.log("Estatísticas ativadas.");
  // Adicione aqui scripts para outras ferramentas de estatísticas, se necessário
} else {
  console.log("Estatísticas desativadas.");
}

// Funcionalidades de formulários (se aplicável)
if (forms) {
  console.log("Funcionalidades de formulários ativadas.");
  // Adicione aqui ações ou scripts relacionados a formulários
} else {
  console.log("Funcionalidades de formulários desativadas.");
}

alert("Preferências salvas!");
  1. I assume that if I press the disable button, all statistics-related functionality will be disabled, even the necessary cookies that appear grayed out in the checkbox options. Is this correct?
Hi. Happy new Year! I tried to implement the banner with EU cookie consent. There are some things I am unsure about: 1. How can I remove options from the checkbox list? I don't have any statistics code, and I don’t need form consent here because each form already has a consent box below it. 2. I added values to my checkbox list, which I believe are read by the script I inserted into the designated area. Could you confirm if I did this correctly? 3. For the confirm button, I linked it to #acceptButton. I’m not sure if this is necessary. Using just # causes problems with my SEO software. I assume I cannot insert a function directly into my script area because, when I click the button, I cannot choose which function it will call. So I inserted the content of the function directly into the script. Could you confirm if I did this correctly? Here’s the code I inserted: const necessary = true; // Sempre ativo const analytics = document.querySelector("#analytics")?.checked || false; const statistics = document.querySelector("#statistics")?.checked || false; const forms = document.querySelector("#forms")?.checked || false; const preferences = { necessary: necessary, analytics: analytics, statistics: statistics, forms: forms, }; // Salvar preferências em um cookie document.cookie = `cookiePreferences=${JSON.stringify(preferences)}; path=/; max-age=31536000`; // Expiração de 1 ano // Configurar Google Analytics 4 (GA4) if (analytics) { console.log("Google Analytics ativado."); // Carregar o script do gtag.js const script = document.createElement("script"); script.src = "https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"; // Substitua pelo seu Measurement ID script.async = true; document.head.appendChild(script); // Inicializar o GA4 window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments); } gtag("js", new Date()); gtag("config", "G-XXXXXXXXXX"); // Substitua pelo seu Measurement ID } else { console.log("Google Analytics desativado."); } // Estatísticas adicionais (se aplicável) if (statistics) { console.log("Estatísticas ativadas."); // Adicione aqui scripts para outras ferramentas de estatísticas, se necessário } else { console.log("Estatísticas desativadas."); } // Funcionalidades de formulários (se aplicável) if (forms) { console.log("Funcionalidades de formulários ativadas."); // Adicione aqui ações ou scripts relacionados a formulários } else { console.log("Funcionalidades de formulários desativadas."); } alert("Preferências salvas!"); 4. I assume that if I press the disable button, all statistics-related functionality will be disabled, even the necessary cookies that appear grayed out in the checkbox options. Is this correct?
You must log in or register to leave comments