Adding Google reCaptcha v3 to the Shopify contact form

Highlighted
New Member
2 0 0

According to this page (http://blog.ivertech.com/blog/why-google-recaptcha-v2-or-v3-does-not-work-on-shopify-contact-form), Google reCaptcha v3 cannot actually be implemented on Shopify. 

Since Shopify already implements Google reCaptcha v2 by default, there's really no need for you to implement v3.   Some users from this forum who claimed that they were able to implement reCaptcha v3 successfully were mistaken.  They were actually seeing the effect of reCaptcha v2 implemented by Shopify by default. 

More details can be found from the link above.

0 Likes
Highlighted
Explorer
48 1 13
Hi. This is interesting. Did you find out how to activate the v2 capture on default contact form? As shopify uses captcha for their own forms it doesn't offer it for shop holder by default
0 Likes
Highlighted
New Member
2 0 0

@kub wrote:
Hi. This is interesting. Did you find out how to activate the v2 capture on default contact form? As shopify uses captcha for their own forms it doesn't offer it for shop holder by default

Shopify actually offers Google reCaptcha v2 to all shop holders by default.  You will not see the "I'm not a robot" checkbox the first time you submit the contact form at your ship.  However, if you submit the form again within 24 hours (from the same computer), you will be presented with the "I'm not a robot" checkbox. You just need to make sure that your contact form uses the "page.contact" template.

 

If you want to enable reCaptcha v2 at all time (not just the second submission), you can try out this free method to fight spam (without paying any monthly Shopify fee).  It is easy to implement and it doesn't cost you a dime.  When you use the free method, make sure you DO NOT use the "page.contact" template.  Use the "page" template instead.

 

0 Likes
Highlighted
Tourist
7 0 1

reCaptcha v3 can be implemented on Shopify, it is just tricky because it requires server side validation. The missing piece of the puzzle that I believe confuses people is that to do the server side validation on Shopify you need to have a server application that communicates with your Shopify website. If you have development resources available the implementation is easy and documented here https://developers.google.com/recaptcha/docs/v3.

 

Now the real issue is that even with proper reCaptcha (any of the versions) your blog is still open for spam by bots, they go around the entire form! See the discussion here if interested https://community.shopify.com/c/Technical-Q-A/Preventing-spam-on-blog-post-comments/m-p/722790/highl....

 

If you want to solve both problems seamlessly and don't have development resources I have published a Shopify app that easily installs reCaptcha v3 with the server side validation for blog comments and on top correctly marks any comments that were not posted through the comment form as spam. You can find the app here https://apps.shopify.com/recaptcha-spambuster. Feedback is very welcome.

1 Like