Do you want to add Google reCAPTCHA to your WordPress forms to stop spam bots from filling out your form?
With the increasing sophistication of automated bots, protecting your website from spam, fraud, and abuse is more important than ever. This is where Google reCAPTCHA comes into play.
Google reCAPTCHA is a free service that protects your website from spam and abuse by distinguishing between human and automated access. It helps ensure your website interactions are genuine, protecting the integrity and security of your data.
MailOptin offers seamless integration with Google reCAPTCHA, providing an extra layer of security to your WordPress optin forms by filtering out malicious activities and ensuring that your form submissions are legitimate.
Getting Started with MailOptin
MailOptin is a lead generation plugin that converts website visitors into subscribers and WordPress users, sends one-off newsletters, and creates automated, event-triggered follow-up emails—all within WordPress.
MailOptin supports Google reCAPTCHA versions 2) and Score-Based (v3), providing enhanced security for your forms. And you can only use one in all your forms.

reCAPTCHA
This version requires the user to click a checkbox indicating they are not a robot. This will either pass the user immediately (with No CAPTCHA) or challenge them to verify that they are human.

reCAPTCHA Score-Based (v3)
To avoid asking for user interaction, Google will monitor the user’s behavior on your site to look for what it considers suspicious activity. Then, reCAPTCHA will assign them a score. You will decide the score required for your forms to be submitted. If a user’s reCAPTCHA score does not meet your requirements, they will have no way to submit your form.

To integrate either of the Google reCAPTCHA versions above into your MailOptin optin forms, follow these steps:
Step 1: Install and Activate MailOptin
Start by purchasing a MailOptin plan and downloading the plugin from the welcome email or your MailOptin account.
Next, upload and install the plugin on your WordPress website.

Once installed, click “Activate” to activate the plugin.

Step 2: Generating reCAPTCHA Keys in Google
Google recently moved the reCAPTCHA dashboard to Google Cloud. They now call the previous method, which uses the old API (reCAPTCHA Classic), while the new approach via Google Cloud is called reCAPTCHA Enterprise.
Please use reCAPTCHA Enterprise when setting this up for the first time as we plan to remove the Classic implementation in a future version.
Getting reCAPTCHA Enterprise Keys
Log in to the Google Cloud Console with your Google account and go to the reCAPTCHA page.
If you have not created a project before, you will need to create one from the project picker in the top-left corner to access the reCAPTCHA page.

Please take note of the ID of your project displayed in the project picker (in the screenshot above) as we will be needing it.
On the reCAPTCHA page, click on the button to create a key.

Enter a display name, select Application type as Web, add your domain, and submit the form.

By default, the key will be for score-based (v3) reCAPTCHA. If you prefer a checkbox challenge type, open the “Additional settings” section and enable “Will you use challenges?“.

After submitting the form, you will be redirected to the key details page where you will see the key’s ID. Copy it somewhere as we will be needing it when integrating with ProfilePress.
The final step is to create an API key, following the guide below
In the Google Cloud console, go to the Credentials page, click on Create credentials, and select API Key.

Enter a name for the API key, then select reCAPTCHA Enterprise API as the API restriction.

Submit the form to get your generated API key.

Getting reCAPTCHA Classic Keys
Go to the Google reCAPTCHA site. You will be prompted to log in if you aren’t.
Enter a label used to identify the site in the future, select the reCAPTCHA type, enter the domain name of your website, and submit.

After registering, you should see a page with the keys for your website.

Step 3: Saving the reCAPTCHA Keys in MailOptin
Log in to your WordPress site and go to MailOptin » Settings. Then, click on the reCAPTCHA tab.
Select the reCAPTCHA type and enter your Site Key and Secret Key.

Click on the Save Changes button to store your settings.
Step 4: Adding reCAPTCHA to a Form
Open the form to which you want to add reCAPTCHA and go to the “Fields” panel.
Add a new field and select reCAPTCHA Checkbox (v2) or reCAPTCHA Score-Based (v3) as the field type.


Finally, save the changes.
Preview the form on your site, and you should see the reCAPTCHA (for the checkbox challenge) or the badge in the bottom-right corner (for score-based reCAPTCHA).
Secure your WordPress forms with Google reCAPTCHA.
Integrating Google reCAPTCHA with MailOptin can fortify your WordPress email signup forms against malicious activity and ensure a seamless, secure experience for your visitors.
We hope this article has helped you learn how to integrate Google reCAPTCHA with your WordPress optin forms using MailOptin.