# How to Set Up ActiveLayer in Contact Form 7 (Step by Step)

Source: https://activelayer.com/docs/how-to-stop-contact-form-7-spam/
If Contact Form 7 spam is filling up your inbox, you’re not alone. In this tutorial, you’ll learn how to set up Contact Form 7 spam protection with ActiveLayer. It’s an AI-powered filter that blocks spam before it reaches you, and it runs entirely in the background, so your visitors never see a puzzle or a checkbox.

ActiveLayer works with any Contact Form 7 form, and the free plan includes 200 spam checks (one-time), so you can complete this entire tutorial without spending anything.

In This Article

- [Step 1: Create Your Free ActiveLayer Account](#aioseo-step-1-create-your-free-activelayer-account-11)
- [Step 2: Install the ActiveLayer Plugin](#aioseo-step-2-install-the-activelayer-plugin-19)
- [Step 3: Connect Your API Key](#aioseo-step-3-connect-your-api-key-27)
- [Step 4: Enable the Contact Form 7 Integration](#aioseo-step-4-enable-the-wpforms-integration-37)
- [Step 5: Tag Your Form Fields](#aioseo-step-5-tag-your-form-fields)
- [Step 6: Testing](#aioseo-step-6-testing)

**What you’ll need before starting:** a WordPress site with Contact Form 7 installed, and admin access to your WordPress dashboard.

### Step 1: Create Your Free ActiveLayer Account

First, head over to [activelayer.com](https://activelayer.com/) and sign up for a free/pro account. The free plan includes 200 spam checks (one-time), and you don’t need to enter a credit card.

Once you’ve signed up, you’ll be redirected to the ActiveLayer dashboard at app.activelayer.com. Click the **New Project** button to create a new Project.

[image: ActiveLayer new project]

Enter your Project Name (which can be used to recognize your site), select your Platform, and then click on the **Create Project** button.

[image: project name]

From the next page, you’ll be able to copy the API key. This key connects your WordPress site to ActiveLayer, so copy it or keep this tab open. You’ll need the key in Step 3. Also, note that this key is displayed only once.

[image: ActiveLayer API key]

### Step 2: Install the ActiveLayer Plugin

Now switch over to your WordPress dashboard.

- Go to **Plugins > Add New**.

- Search for **ActiveLayer**.

- Click **Install Now** and then activate the plugin.

[image: install activelayer]

Once activated, you’ll see a new **ActiveLayer **item in your WordPress admin menu.

### Step 3: Connect Your API Key

Next, let’s connect your site to your ActiveLayer account.

- In your WordPress dashboard, go to **ActiveLayer > Settings**.

- Paste the API key you copied in Step 1 into the API key field.

- Click **Verify key**.

[image: api key activelayer]

When the key is verified successfully, you’ll see a green checkmark. That means your site is now talking to ActiveLayer.

[image: api added]

If you don’t see the green checkmark, double-check that you copied the entire key with no extra spaces at the beginning or end.

### Step 4: Enable the Contact Form 7 Integration

Go to **ActiveLayer > Integrations**. Contact Form 7 is enabled by default after your key is connected.

- Check the box next to **Contact Form 7**.

- Click **Save Changes**.

This will enable ActiveLayer for all your forms in Contact Form 7. To enable it for individual forms, click **Configure**, then select the form you’d like to protect.

[image: contact form 7 activelayer]

Alternatively, you can enable the protection for individual forms directly from the form.

- Go to **Contact > Contact Forms** and open the form you want to protect.

- Click the **ActiveLayer **tab.

- Tick the checkbox to **enable spam protection**.

- Save your form.

[image: contact form 7]

### Step 5: Tag Your Form Fields

Contact Form 7 lets you name your fields anything you like, so ActiveLayer has no way of knowing which field holds the sender’s name and which holds their message. Tagging tells it exactly what each field contains, which is what allows it to analyze the submission properly.

You tag a field by adding an `activelayer:` option inside the form tag.

| **What the field holds** | **Tag to add** |
| --- | --- |
| Sender’s name | activelayer:name |
| Email address | activelayer:email |
| Message content | activelayer:message |
| Website or URL | activelayer:url |

To add tags, open the Form tab in your Contact Form 7 editor and then make the changes like this:

```
<label> Your name
    [text* your-name autocomplete:name activelayer:name] </label>

<label> Your email
    [email* your-email autocomplete:email activelayer:email] </label>

<label> Subject
    [text* your-subject] </label>

<label> Your message (optional)
    [textarea your-message activelayer:message] </label>

[submit "Submit"]
```

Note that the tag goes inside the square brackets, after the field name and any other options, separated by a space. Once you’ve made all the changes, save your form.

### Step 6: Testing

Once you’ve configured everything, confirm that the spam protection is working.

- Visit your form on the front end of your site and submit a normal test message.

- In your WordPress dashboard, go to **ActiveLayer > Submissions**.

Your test submission should appear in the list, along with the status (clean or spam).

If nothing appears, go back to Step 4 and confirm the ActiveLayer checkbox is still ticked on that form, then check that your field tags are inside the brackets.

### What Happens Next?

From now on, every submission to your protected forms is checked by ActiveLayer’s AI in milliseconds. Real messages come through exactly as before. ActiveLayer blocks spam, and your visitors never see a CAPTCHA.

You can also review everything ActiveLayer catches in your online dashboard at [app.activelayer.com](https://app.activelayer.com/). Log in and open the **Analytics **page, where each submission shows the result and its risk level. If the filter ever gets one wrong, you can mark it as spam or clean from there.

Ready to stop Contact Form 7 spam for good? [Create your free ActiveLayer account](https://activelayer.com) and you’ll be protected in the next few minutes.

### Need help?

Contact [ActiveLayer support](https://activelayer.com/contact/) if you run into issues with the installation, API key, or configuring Contact Form 7 tags.

**Support & billing**: [support@activelayer.com](mailto:support@activelayer.com)
