User Tools

Site Tools



For more details see the Google Invisible reCaptcha

Google Invisible reCaptcha for Magento 2

Google invisible reCaptcha protects your store from spam and frauds while letting real customers pass through easily. But anyway Captcha integration takes time and coding effort. To minimize your developer's work, we create Invisible Captcha solution. Now it's enough just to fill some settings fields to secure your store.

  • Manage your captcha settings in one place
  • Make changes without digging into a website code
  • Protect your store with the latest security option

Add Google Invisible reCaptcha to any forms on your website easily. The module enables you to protect your store from bots without any coding.

General Settings

To get the access to the 'Invisible Captcha' settings please go to Stores → Configuration → Amasty extensions → Google Invisible Captcha and expand the General Settings section.

Choose Yes to enable invisible reCaptcha on your website.

To get the Site key and Secret key click the link.

Then, set the name, select the Invisible reCAPTCHA option, define the domain of your website, tick the Terms of use checkbox and press the Register button.

Copy keys from this page:

Next, you can specify the Language of the Google Invisible reCaptcha that will be used for all users instead of their browsers' preferences. You can see the list of the available languages here.

Invisible Captcha for Amasty Extensions

In this section you can enable or disable the Google Invisible reCaptcha for supported Amasty modules. Choose Yes to enable the Captcha for the extension or No to disable it. Please note that you will get the Not Installed status when you do not have the appropriate extension.

Advanced Settings

To add Google Invisible reCaptcha to any custom form on your website please go to the Advanced Settings section.

In the Urls to enable field, you need to put the URL where a form is sent.

Note! It’s not the URL where your form is located.

For example, you would like to add a Google reCAPTCHA to a registration form. This is how to get the URL:

1. Go to the registration form page.

2. Fill in the form.

3. Open the 'Inspect' window, and then the 'Network' tab.

4. After submitting the form you need to find a request with POST in the 'Method' column and 302 Status.

5. Click on this request and in the 'Headers' tab find a 'Request URL'. Сopy the path from the URL (in our example it is customer/account/createpost/).

6. Paste the URL in the URLs to enable field.

In the Selector for forms field, you need to put a CSS selector of the form.

For example, this is how to get a CSS selector for 'Create an account' form:

1. Go to the Create an account page and open the Inspect window.

2. Find the HTML code of the form, click on the right mouse button and choose Copy → Copy selector

Note! You should be on 100% sure that the selector is unique. Otherwise, Google CAPTCHA would be added to all elements that have this selector name. Ask your developer to check it.

3. In our case the selector is .customer-account-create .account-create form and we add it to the Selector for forms field.

Don't forget to click on 'Save' button after you add a CAPTCHA to all forms that you need.

The extension supports three forms by default. In case you don't need any of them, you can disable these forms manually.

Enable Invisible Captcha for guests only - enable the option to show invisible Captcha only for guests. Thus, the extension won't display Captcha to registered clients.

IP whitelist - specify certain IP addresses for which you want to disable Invisible Captcha. Place each IP address on a new line.

Hot to Check Invisible reCaptcha

When everything is set, it is important to check how reCaptcha works. Please, follow these steps:

  1. Open the page which has a form protected by Google Invisible reCaptcha;
  2. Open your browser console;
  3. Choose to perform as any other browser or device;
  4. Try submitting the form several times until Google shows you the reCaptcha test.
Find out how to install the Google Invisible reCaptcha extension for Magento 2 via Composer.

Rate the user guide
 stars  from 8 votes (Details)
magento_2/google_invisible-recaptcha-m2.txt · Last modified: 2018/11/06 11:12 by karpova