Protección contra spam en los formularios

Cloudflare Turnstile and Google reCAPTCHA v3 protect website forms against spam and abuse. They attempt to distinguish between human and bot submissions using non-interactive challenges based on telemetry and visitor behavior.

Importante

We recommend using Cloudflare Turnstile, as reCAPTCHA v3 may not be compliant with local data protection regulations.

Nota

All pages using the Form, Newsletter Block, or Newsletter Popup snippets are protected by both tools. Web login, sign-up and password reset pages are also protected.

Configuración de Cloudflare Turnstile

En Cloudflare

  1. Create or log in to a Cloudflare account.

  2. In the dashboard’s navigation sidebar, go to Application security ‣ Turnstile.

  3. On the Overview page, click Add widget.

  4. Add a Widget name to easily identify it.

  5. Click Add Hostnames, enter a custom hostname (e.g., example.com or subdomain.example.com), then click Add twice.

  6. Seleccione un Modo widget:

    • The Managed mode is recommended, as it allows Turnstile to prompt visitors to confirm they are human when necessary.

      Widget de verificación de Cloudflare Turnstile
    • En los modos No interactivo e Invisible no se le pedirá a los visitantes que interactúen. En el modo No interactivo se mostrará un widget de carga para advertir que Turnstile está protegiendo el formulario; sin embargo, este widget no es compatible con Odoo.

      Nota

      Si la revisión de Turnstile falla, los visitantes no podrán enviar el formulario y aparecerá el siguiente mensaje de error:

      Mensaje de error en la verificación de Cloudflare Turnstile.
  7. Haga clic en Crear.

Se muestran las claves generadas. Deje la página abierta para facilidad de uso, ya que necesita copiar estas claves en Odoo.

En Odoo

  1. From the database dashboard, open the Settings app. Under Integrations, enable Cloudflare Turnstile, then click Save.

  2. Open the Cloudflare Turnstile page, copy the Site Key, and paste it into the CF Site Key field in Odoo.

  3. Abra la página de Cloudflare Turnstile, copie la Clave secreta y péguela en el campo Clave secreta CF en Odoo.

  4. Haga clic en Guardar.

Truco

Navigate to Application security ‣ Turnstile in your Cloudflare account to View analytics and access additional settings.

Configuración reCAPTCHA v3

Advertencia

Es posible que reCAPTCHA v3 no cumpla con las regulaciones locales de protección de datos.

En Google

  1. Sign up or sign in to a Google account.

  2. Open the reCAPTCHA website registration page.

  3. Enter a Label for the website, e.g., example.com.

  4. Leave the reCAPTCHA type set to Score based (v3).

  5. Introduzca uno o mas Dominios (por ejemplo, example.com or subdomain.example.com).

  6. Under Google Cloud Platform, a project is automatically created or selected if one already exists for the logged-in Google account. Click the field to select a project manually or rename the automatically created project.

  7. Acepte los términos y condiciones de servicio.

  8. Haga clic en Enviar.

Se muestran las claves generadas. Deje la página abierta para facilidad de uso, ya que necesita copiar estas claves en Odoo.

En Odoo

  1. From the database dashboard, open the Settings app. Under Integrations, activate Enable reCAPTCHA.

    Advertencia

    Do not uninstall the Google reCAPTCHA integration module, as it would also remove many other modules.

  2. Open the Google reCAPTCHA page, click COPY SITE KEY, and paste it into the Site Key field in Odoo.

  3. Open the Google reCAPTCHA page, click COPY SECRET KEY, and paste it into the Secret Key field in Odoo.

  4. Change the default Minimum score (0.70) if necessary, using a value between 0.00 and 1.00. The higher the threshold is, the harder it is to pass the reCAPTCHA, and vice versa.

  5. Haga clic en Guardar.

You can notify visitors that reCAPTCHA protects a form. To do so, navigate to the form and open the website editor. Then, click somewhere on the form, go to the Style tab, and, in the Block section, enable Show ReCAPTCHA Policy.

Mensaje de política de reCAPTCHA que aparece en el formulario

Nota

Si el reconocimiento falla, aparecerá el siguiente mensaje de error:

Mensaje de error en la verificación de Google reCAPTCHA.

Truco

La analítica y otros ajustes adicionales están disponibles en la página de administración de Google reCAPTCHA. Por ejemplo, puede recibir alertas por correo electrónico si Google detecta tráfico sospechoso en su sitio web o puede ver el porcentaje de solicitudes sospechosas, lo que puede ayudarle a determinar el puntaje mínimo adecuado.