cancel
Showing results for 
Search instead for 
Did you mean: 

recaptcha for newsletter subscription

recaptcha for newsletter subscription

Hello, 

I installed Google ReCaptcha as explained here and it works: 

 

https://docs.magento.com/m2/ce/user_guide/stores/security-google-recaptcha.html

 

BUT I do not find any option to activate it for the newsletter subscription form. 

 

Thanks a lot for any feedback !

 

Best regards, 

Fabianus

 

using magento community edition 2.2.1

9 REPLIES 9

Re: recaptcha for newsletter subscription

By default, Magento doesn't have captcha on Newsletter.

 

If you want to add you have to add it manually or you can check out this extension 

 

https://magecomp.com/magento-2-google-recaptcha.html

 

And I would recommend  implementing invisible captcha instead of ReCaptcha as in invisible captcha user don't have to click to verify captcha until they spamming

 

https://amasty.com/google-invisible-recaptcha-for-magento-2.html

 

Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.

Re: recaptcha for newsletter subscription

Hello Agarwal, 

 

thanks for your reply ! There is no option to activate captcha for the newsletter subscription

 

Regards, 

Fabianus

Re: recaptcha for newsletter subscription

I have updated my answer

Re: recaptcha for newsletter subscription

Hello @fabianus,

 

Please try again with following steps for add reCAPTCHA on site

 

Step 1: Install Google reCAPTCHA

  • You can install the module using the following composer command:
    Install Module
    composer require msp/recaptcha:2.0.0
  • If you already have installed a Magento instance, you need to run the following commands to enable the module:
    Enable Module
    php bin/magento module:enable --all
    php bin/magento setup:upgrade
  • Troubleshooting
    If you have issues with reCAPTCHA, you can disable it from the command-line. This will disable the module for backend access.
    Disable Module
    php bin/magento msp:security:recaptcha:disable

Step 2: Generate Google reCAPTCHA keys
Follow the instructions in the user guide to enable and configure Google reCAPTCHA. To learn more, see:

Google reCAPTCHA requires a pair of API keys to enable. You can get these keys free of charge through the reCAPTCHA site. Before generating the keys, consider the type of reCAPTCHA you want to use.

  1. Visit the Google reCAPTCHA page, and log in to your account.
  2. Enter a Label for the keys. For example, enter Magento. You only need one set of keys for your entire Magento instance.
  3. Choose the type of reCAPTCHA that you want to use:
    reCAPTCHA V2 Verifies with a button click.
    Invisible reCaptcha Verifies in the background without interaction.
  4. In the Domains text box, enter a list of domains without the HTTP or HTTPS prefix, one per line. Google verifies the addresses entered.
    - Add your Magento instance domain and any subdomains.
    - You can add localhost, other local VM domains, and staging domains as needed for testing.
  5. Mark the checkbox to Accept the reCAPTCHA Terms of Service.
  6. (Optional) Mark the Send alerts to owners checkbox to send notification if Google detects issues or suspicious traffic. https://www.screencast.com/t/vOxz2E5w1Y
    recaptcha-register-new-site.png
  7. Tap Register. and do the following:
    a. When the domain(s) you added appear at the top of the page, choose the Magento domain to get your keys.
    b. Scroll down to the Adding reCAPTCHA to your site section and expand Keys. You will need these keys when enabling Google reCAPTCHA. https://www.screencast.com/t/gRzNq7C9
    recaptcha-keys.png

Step 3: Configure Google reCAPTCHA in Magento

  1. Sign in to the Admin of your Magento store. On the Admin sidebar, tap Stores. Then under Settings, choose Configuration.
  2. In the upper-right corner, set Store View to “Default Config.”
  3. In the panel on the left under Security, choose Google reCAPTCHA. Then, expand the General section, and enter the following generated keys:
    Google API website key
    Google API secret key
    https://www.screencast.com/t/Rxen6NRQkd
    config-security-recaptcha-keys.png
  4. Expand the Backend section, and do the following:
    a. Set Enable to “Yes.”
    b. To change the Theme, clear the Use system value checkbox. Then, choose one of the following: Light / Dark
    c. To change the Size, clear the Use system value checkbox. Then, choose one of the following: 
    https://www.screencast.com/t/6EOq4vFEug
    config-2fa-google-recaptcha-backend.png
  5. Expand the Frontend section. Then, do the following to add reCAPTCHA to customer accounts:
    https://www.screencast.com/t/CrZJjhJYNtg
    config-2fa-google-recaptcha-frontend.png
    a. Set Enable to “Yes”.
    b. Choose the reCAPTCHA type you want used in Admin forms. You must have added the correct API keys for the type.
    reCAPTCHA v2 validates with the “I’m not a robot” checkbox.
    Invisible reCAPTCHA (recommended) validates in the background without requiring user interactions.
    c. To change the Theme, uncheck Use system value checkbox and select a Light or Dark Theme from the drop-down menu.
    d. To change the Size, uncheck Use system value checkbox and select a theme from the drop-down menu: Normal or Compact.
    e. Select when to use reCAPTCHA for customer accounts. By default, reCAPTCHA is enabled for these pages.
    Use in login
    Use in Forgot password
    Use in Contact
    Use in Create user
  6. When complete, tap Save Config.

 

--
If my answer is useful, please Accept as Solution & give Kudos

 

Re: recaptcha for newsletter subscription

Hello @gelanivishal

 

thanks for your help. I went through this installation and it works. But as said, this does not give captcha for the newsletter subscription

 

Regards, 

Fabianus

Re: recaptcha for newsletter subscription

Hello @fabianus

 

As by default, Magento doesn't have captcha on Newsletter.

 

To apply recaptcha for newsletter form you can use this plugin :

https://marketplace.magento.com/nublue-newsletterrecaptcha.html

 

Hope it will work for you.

 

With this plugin the below link will also be helpful for you : 

https://magento.stackexchange.com/questions/173359/how-to-use-recaptcha-for-newsletter-subscription-...

 

If my answer is useful, please Accept as Solution & give Kudos.Smiley Happy

Re: recaptcha for newsletter subscription

Hello @fabianus

 

I have used this article to add the captcha on the newsletter subscription and it worked for me you can give a try.

 

https://stackoverflow.com/questions/40035052/how-to-add-google-recaptcha-in-the-newsletter-form-in-m...

 

Re: recaptcha for newsletter subscription

I've installed the module on my 2.2.5 site.

 

It works in development but admin serves blank white pages once it's in production mode

 

Any ideas?

Re: recaptcha for newsletter subscription

MageAnts released Magento 2 Google Invisible Recaptcha extension