> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.easystore.co/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# 防止机器人注册您的网店

###### 在这篇文章中：
1.  [介绍 ](#2-1)
2.  [获取 site key](#2-2-site-key)
3.  [在客户注册页面启用 Google reCAPTCHA ](#2-3-google-recaptcha)
---    
## 1. 介绍

垃圾邮件机器人是一种自动计算机程序，它们会在互联网上的注册表单中查找并提交虚假账户信息。如果您发现自己的商店收到了一些虚假注册信息，这并不值得惊慌。但是，您应该考虑采取一些措施，防止您的网站出现大量虚假注册。当您试图针对受众调整业务时，不准确的受众数据可能会影响您的营销计划。 
  
本文将向您介绍如何在您的商店中启用 Google reCAPTCHA。reCAPTCHA 要求访问者勾选受保护的 reCAPTCHA 框，以完成注册过程。由于垃圾机器人无法访问复选框，因此他们无法加入您的受众群。 

## 2. 获取 site key   

2.1 前往 [Google reCAPTCHA](https://www.google.com/recaptcha/admin/create) > 填写必要内容 > 提交。

| **💡 小贴士：** 在新标签页中打开图像，使图像更清晰

![](https://storage.crisp.chat/users/helpdesk/website/b34797d9594d3000/yordle-52_16o3szk.png)

![](https://storage.crisp.chat/users/helpdesk/website/b34797d9594d3000/yordle-53_5akm47.png)

## 3. 在客户注册页面启用 Google reCAPTCHA 

3.1 前往 [EasyStore 后台](https://admin.easystore.co/login) > 销售渠道 > 线上网店 > HTML/CSS > 找到 **templates/customers/register.liquid** 文件档 > 将以下代码粘贴在最上方。

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

效果如下：

![](https://storage.crisp.chat/users/helpdesk/website/c4eeb47ba9d46800/6dbf66eb-f113-4879-b067-45eeca_1lhe9h0.png)

  
3.2 接下来，找到 < **terms-policy.links** > ，在其下 2 行粘贴以下代码 > 将 X 改为您之前获得的 site key 。 

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

  
3.3 再来，找到 < **register/content_bottom** >， 将以下代码粘贴在上方。

```<script>


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

	</script>
```

  
结果如下：

![](https://storage.crisp.chat/users/helpdesk/website/232c4a8b72518200/9686a63c-7219-4739-becb-ee36a0_13e440m.png)

3.4 保存即完成！

![](https://storage.crisp.chat/users/helpdesk/website/3b51c61bf41c4600/b8318344-ce5e-4469-8fd9-6f851f_e1qdtd.png)