How to add google recaptcha in shopify store?

Highlighted
New Member
2 0 0

How to add ReCaptcha protection to spam mail on contact form.

0 Likes
Highlighted
Shopify Staff
Shopify Staff
536 31 84

Hi, @Divyajeet.

 

Tira here, from Shopify Support.  

 

This is a great question. There are some merchants who have asked how to add reCaptcha to their store to prevent spam from coming in through the contact form. You can find solutions that merchants have used, here: Adding Google reCaptcha v3 to the Shopify Contact form. The solutions offered involve adding a script/code to your theme to customize it.

 

To customize your theme, you can login to your Shopify admin, then click on Online Store > Themes and click on the "Customize" button on the theme that you wish to edit. Before editing your theme, I recommend duplicating your theme so that you have another copy available should you need to go back to your default settings in the event the customization may not work. You can view the steps of how to edit your theme's code, as well as how to back-up your theme, and find out what support is available for your theme in our help doc here: Editing theme code.

 

Let me know if that helps! 

Tira | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
New Member
1 0 0

I would like to thank Google for reCaptcha . Goodbye to John Smith from Google...Woohoo!!!!

0 Likes
Highlighted
Shopify Partner
11 0 1

There is no conclusive answer in that thread for non-Plus stores though Tira. Is Shopify planning on implementing reCAPTCHA for non-Plus stores at some point in the future?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
536 31 84

Hi, @kimona.

 

Tira here, from Shopify.

 

Thank you for your question.  Are you looking to add reCAPTCHA to your contact form, or somewhere else? If somewhere else, please let me know and I can dig into this further for you. 

Tira | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Shopify Partner
11 0 1

Thanks for responding @Tira 
I am looking to implement it on a contact form AND on the newsletter subscription box.
Firstly, is it possible to set up a recaptcha on the latter?
And secondly, I'm assuming that you asking if I want to implement it anywhere else than the contact form that it's not possible there on non-Plus stores? Could you please confirm what the status is for having a recaptcha on non-Plus stores? 

0 Likes
Highlighted
Shopify Partner
11 0 1

*I'm implementing it on User Registration as well as Newsletter subscriptions

0 Likes
Highlighted
Shopify Partner
11 0 1

Any update on this @Tira ?

0 Likes
Highlighted
Shopify Staff
Shopify Staff
536 31 84

Thank you for confirming what it is you're looking to do, @kimona.

 

If you're looking for reCaptcha to be enabled on customer account registrations, this is currently a feature that is included on non-Plus stores as of January 2020. CaptchaV2 has been enabled for creating customer accounts and for resetting passwords on customer accounts. Are you seeing something different on your store? If you are, please reply to this thread with a screenshot and let me know so that I can look into this further for you. 

If you're looking to add one to your contact form, this would need to be custom coded and is outside our scope of support. I did find some instructions that you can follow to add this function to your  blog comments, newsletter function and the contact page on your store:

 

  1. Add reCaptcha on all pages that the spam is coming from. To do this you go to https://www.google.com/recaptcha/intro/v3.html and set up your site by clicking admin console in the top-right corner.
  2. Click on “see client side integration” and grab the code from there.
  3. Paste the code at the very top of the newsletter.liquid, customers/account.liquid and contact-page.liquid files in Online Store > Themes > Current Theme > Actions > Edit code, each time replacing the site_key part with the site key provided when you added your site to reCaptcha.

If you have any questions, you can take a look at Google's documentation and FAQ for help. 

I understand this is something that you would like to add to your store without custom coding. Is that correct? If so, please reply with your myshopify.com URL and I can forward your store to our developers to be aware that this is a function you want to see. This feedback allows us to improve Shopify for you and all of our merchants. If we do move forward with this feature, we will list it in our changelog or our announcements page

I look forward to hearing from you!

Tira | Social Care @ Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

0 Likes
Highlighted
Shopify Partner
11 0 1

Hi @Tira 

Thank you for confirming, and great to know that reCaptcha V2 has been enabled on account creation and password resets (does this include login page too out of interest?). 

I am very happy to implement any required code. I've already set up reCaptcha V2 on the client side, but it has not lowered the amount of spam accounts that are being created. My problem is setting up server side verification for reCaptcha.  Which I imagine I will need to do with a private app.  My first question was if this is possible, but perhaps this is not the appropriate channel to ask this question?

As far as I know, the spam accounts are still being created - however the theme is still on a version released by the theme vendors circa last year October, so I imagine that the theme needs to be updated to get this functionality integrated?

Either way, attached is a screenshot of an account created that has a spammy name.
image.png

0 Likes