> For the complete documentation index, see [llms.txt](https://docs.roadmap.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roadmap.so/forms/enable-recaptcha-spam-protection.md).

# Enable reCAPTCHA spam protection

Protect forms from bot submissions with Google reCAPTCHA v2 Invisible, then place the site and secret keys in the correct settings.

Use this when a form needs spam protection without adding a visible checkbox for real shoppers.

Roadmap supports **Google reCAPTCHA v2 Invisible**.

reCAPTCHA is a Google service that helps tell real shoppers apart from automated bots.

Without it, forms can attract spam submissions that clutter inboxes, pollute customer data, and create noise for your team.

Invisible reCAPTCHA is not visible to customers on the storefront and works silently in the background.

Suspicious traffic can be challenged or blocked before the submission is accepted.

This makes it a good fit for trade applications, quote requests, contact forms, and other lead forms where you want less spam without adding friction.

### Before you start

Have these ready first:

* a Google account
* the form has already been created in **Forms**
* access to **Settings** in Roadmap
* access to **Online Store → Themes → Customize**
* the storefront domain where the form will run

{% hint style="warning" %}
Use **Challenge (v2)** with **Invisible reCAPTCHA badge**.

Do not use **Score based (v3)** or **I'm not a robot** checkbox.
{% endhint %}

### Set up Invisible reCAPTCHA

{% stepper %}
{% step %}

#### Create the Google key pair

Open [Google reCAPTCHA Admin](https://www.google.com/recaptcha/admin/create).

Then set:

* **Label** to a clear store name or domain
* **reCAPTCHA type** to **Challenge (v2)**
* **Sub-option** to **Invisible reCAPTCHA badge**
* **Domains** to the storefront domain, without `https://` or `www.`

If the form can also load on a `.myshopify.com` domain or a staging domain, add those too.

Leave the default Google Cloud project in place, accept the terms, then click **Submit**.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2F1dXafSRxzJ6p7eZ2heaK%2FScreenshot%202026-04-22%20at%203.41.30%E2%80%AFPM.png?alt=media&amp;token=0bce024c-06a1-4dfa-b034-5a21af2b0cfd" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Copy both keys

Google gives you two values:

* **Site Key** — the public key used in the theme block
* **Secret Key** — the private key used in Roadmap settings

Keep this screen open while you complete the next steps.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FPdAvdh9XbcvHzY1ohAkW%2FScreenshot%202026-04-22%20at%203.42.13%E2%80%AFPM.png?alt=media&amp;token=6141ad3a-13d7-4518-9a87-9e686155c141" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add the Secret Key in Roadmap

In Roadmap, go to **Settings → reCAPTCHA**.

Paste the **Secret Key** into **reCAPTCHA Secret Key**, then click **Save**.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FcbuN5ugI84t8DykeKtA6%2FScreenshot%202026-04-22%20at%203.45.01%E2%80%AFPM.png?alt=media&amp;token=e82554da-5e5f-4284-ac5f-5739d1267d62" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Add the Site Key in the theme block

Go to **Online Store → Themes → Customize**.

Open the page or template that contains the form, then select the **Form Builder** block.

Paste the **Site Key** into **reCAPTCHA Site Key**, then save the theme.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2Fc0Tz6F8KnB4Un6RCQ8jq%2FScreenshot%202026-04-22%20at%203.49.59%E2%80%AFPM.png?alt=media&amp;token=7ed8e263-10c4-41a2-924b-941b90249c37" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Enable spam protection on the form

In Roadmap, open **Forms**.

Open **Settings** for the form you want to protect.

Expand **Advance Settings**, check **Enable reCAPTCHA spam protection**, then save the form.

Repeat this step for each form that should use reCAPTCHA.

<figure><img src="https://393112916-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJ8asLD4FVCFagK40xEr4%2Fuploads%2FPnZugCiO5pR14w5bwkfL%2FScreenshot%202026-04-22%20at%203.44.27%E2%80%AFPM.png?alt=media&amp;token=f4ea54ba-47ff-496f-86a7-445c50ba4021" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Test the live form

Open the form in a private browser window.

Submit a real test entry.

Then confirm:

* the submission is accepted
* the entry appears in Roadmap
* the reCAPTCHA badge appears on the page
  {% endstep %}
  {% endstepper %}

### Key placement rules

Keep these rules straight:

* **Secret Key** goes in **Roadmap → Settings → reCAPTCHA**
* **Site Key** goes in the **Form Builder** theme block
* the form still needs **Enable reCAPTCHA spam protection** turned on

{% hint style="info" %}
The most common setup mistake is swapping the two keys.
{% endhint %}

### Troubleshooting

#### The form submits fail or get rejected

Check these first:

* the **Site Key** and **Secret Key** were not swapped
* both keys were saved
* the form has **Enable reCAPTCHA spam protection** turned on
* the domain in Google matches the domain where the form is loading

#### Spam protection still does not run

Check whether the setting was enabled on the specific form.

Keys alone do not turn on protection.

### Related guides

* [Building with forms](/forms/building-with-forms.md)
* [Add a form to your theme](/forms/add-a-form-to-your-theme.md)
* [View form submissions](/forms/view-form-submissions.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.roadmap.so/forms/enable-recaptcha-spam-protection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
