|
September 16, 2019

From Honey Pot to Gnat Trap

By Amanda Gray

We noticed a huge spike in spam submissions on one of our client’s Keap contact forms. Over the span of 4 days, she averaged daily 30+ new spam contacts for this particular form.

Initially, we set up a honey pot, as suggested in Keap’s “Deterring Spam Bots” help article, using a hidden text field and an action set that applies a tag if the field in the contact record has a value. The logic behind using a hidden form field is that, while a human has no way of seeing this field and entering a value, a bot will often fill out every field, regardless of whether it is hidden or not. Using the tag application, the Spam contact can easily be removed from campaigns and deleted.

Unfortunately, this didn’t work in our case.

Digging deeper into each contact record and submission, we noticed that the bots were always selecting the last radio button for one of the fields. Leveraging this information, we switched tactics, which a week after implementing, has had a 100% success rate.

For a quick and easy solution to form submission bots…

  1. When creating (or editing) your form, add a REQUIRED radio field. You can have as many radio buttons as you would like, but make sure your last radio is a dummy. On this radio button, add a tag. I named mine, in this example, “Spam Trap”.
  2. After publishing the campaign, copy your unstyled HTML form code and add to your webpage and style. In the last span in your radio button field, add a class. As you can see, the class I added is ‘hidden’ (you can use whatever you’d like).
  3. Within your stylesheet, using your new class, add the following style. This hides the option from humans, while still making it an available selection for bots.

    Developer Note: We opted to not use ‘display: none’ on the field. In many cases, the ‘display: none’ style rule will prevent the bot from being able to target the field.
  4. As you can see, the hidden radio button still appears in the HTML, but is hidden from the user’s view.
  5. Now that all bot submissions are being tagged, it’s time to head back into Keap. Open up your contacts from the main navigation, and hit the New Search button. Within the search criteria, go down to Tags and add the tag you created for spam submissions amd click search.

    Once the contact list populates, if you’ve managed to get any spam submissions since publishing your form, click the Save button at the top of the list. In the popup, name the search, select which Keap user you’d like to share it with, and click the green Save button.
  6. Moving back to your Keap dashboard, click the Add Widgets button in the top right corner of the screen. Once the page has loaded, scroll down to Saved Search or Saved Report option and click the Add to Dashboard Button.
  7. Within the new widget you have created, give it a name, select the Saved Search radio button, select COUNT from the first dropdown, select Contact from the second dropdown, and in the third dropdown, select your previously saved search, and give your stat a title.
  8. Once saved, your widget will look like this. From here, you can click the number next to Spam Catches, which will bring up a list of all your Spam contacts, and you can easily mass delete them.

In the future, we will be working on a JavaScript solution to stop the submission from bots from even occurring – keeping your Keap contact list clean and removing the step of manually deleting contacts that have been tagged.

Stay tuned.

About Amanda Gray

Amanda GrayDeveloper Amanda Gray’s career 360 from English major to Web Developer is a pretty good representation of her multi-faceted charm. “I love learning new things,” Amanda says. “That’s why I love development. There’s always something new. It is magic, and we are wizards.”

At 18, Amanda needed a break before college. So she packed her bags and moved to London on a whim. “I got off the plane with no plan whatsoever,” she says. “I did odd jobs. I made it work.” She found a job in a youth hostel where she worked in exchange for room and board, and she traveled all over Europe for six months before her visa ran out.

Amanda’s weird obsession is fountain pens and stationary. “I love the way they write,” she says. “They’re smoother than a ballpoint, and you can change colors and nib sizes on a whim.” She’s a self-proclaimed “stationery nerd” whose mother exclusively used fountain pens, so “I grew up with them,” she says.