Articles on: Email Marketing and Customer Service

Prevent bots from signing up to your store

In this article:

Introduction
Getting site key
Enable Google reCAPTCHA in customer registration page

1. Introduction



Spam bots are automated computer programs that find and submit fake account information to sign up forms on the internet. It is not worth panicking if you find your store receiving several fake signups. However, you should consider taking some action to prevent your website from massive fake signups. Inaccurate audience data could affect your marketing plan when you try to adapt your business for them.

This article shows you how you can enable Google reCAPTCHA in your store. reCAPTCHA requires visitors to check a protected reCAPTCHA box to complete the signup process. Since spam bots can’t access the checkbox, they can’t join your audience.

2. Getting site key



2.1 Go to Google reCAPTCHA > fill up the necessary fields > Submit.

💡 Tips : open image in new tab for clearer image





3. Enable reCAPTCHA in customer registration page



3.1 Go to EasyStore Admin > Channels > Online Store > Edit source > folder templates/customers/register.liquid > paste the following codes on the top.

<script src="https://www.google.com/recaptcha/api.js" async defer></script>



Result as below:




3.2 Then, find < terms-policy.links >, at 2 lines below it, paste the following codes > change X to the site key you obtained earlier.

<p class="g-recaptcha" data-sitekey="X"></p>



3.3 Then, find < register/content_bottom >, paste the following codes above.

<script>


	$("#create_acc").click(function(){
    
    	var captcha = grecaptcha.getResponse();
      	if(!captcha){return false;}
    
    })

	</script>



Result as below :



3.4 Save and done.

Updated on: 20/11/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!