Adding Google reCaptcha v3 to the Shopify contact form

Highlighted
New Member
2 0 1

Hi,

 

Do you know how to add it to the cart page? 

1 Like
Highlighted
Pathfinder
100 1 17

@1examprep wrote:

Hi,

 

Do you know how to add it to the cart page? 


I don't, but read some posts that say that you don't need it in the cart page. Am not exactly sure why. One reason seems to be that Shopify has some hidden spam defenses that store owners do not have access to.

 

We put the Google script into the customer and contact forms - there is a post that describes in detail what to do. If you know how to add it to do the cart, I'd be interested. Also, how to add it to the blog comments page is something we're looking into. Shopify seems to discourage this because they have some sort of spam protection, etc. They encourage adding additional questions - the honey trap. But, we couldn't figure out how exactly that would create additional fields on the comment form. So, it seems we're going in circles at the moment!

Skoory, the curious squirrel of TTL CIC - - a Company limited by guarantee with charitable objectives.
"Finally, if you quote a source, choose one with a name that is easy to pronounce...mental effort is aversive." Thinking Fast and Slow
0 Likes
Highlighted
New Member
2 0 1
Hi,

Shopify added a button to add it automatically. Online Store ->
Preferences-> all the way to the bottom you will see it.

[image: Capture.PNG]



0 Likes
Highlighted
Pathfinder
100 1 17

Not for our store!

 


@1examprep wrote:
Hi,

Shopify added a button to add it automatically. Online Store ->
Preferences-> all the way to the bottom you will see it.

[image: Capture.PNG]




 

Skoory, the curious squirrel of TTL CIC - - a Company limited by guarantee with charitable objectives.
"Finally, if you quote a source, choose one with a name that is easy to pronounce...mental effort is aversive." Thinking Fast and Slow
0 Likes
Highlighted
Excursionist
28 0 18

Can someone tell me how to unsubscribe from this thread so I no longer get emails about replies?  This captcha method does not work, I still receive multiple spam messages per day and I no longer want to receive emails about this non-functioning topic.

0 Likes
Highlighted
Pathfinder
100 1 17

I think you may disable email messages from your profile - top right. That way you won't get any email notifications.

 

(Still figuring out how to navigate and use this forum and how it works ... it is neither simple nor straightforward, is it!)

Skoory, the curious squirrel of TTL CIC - - a Company limited by guarantee with charitable objectives.
"Finally, if you quote a source, choose one with a name that is easy to pronounce...mental effort is aversive." Thinking Fast and Slow
0 Likes
Highlighted
Shopify Partner
1 0 0

I was able to use Firebase functions as the backend (for server-side integration). Pls see details in my blog here

https://dev.to/asmitab/google-recaptcha-v3-with-firebase-functions-ifl

 

Github repo (example): https://github.com/asmitab/recaptcha-v3-example

0 Likes
Highlighted
Tourist
6 0 1

You just need to insert the first google recaptcha key after render=  with green color another one  below  after </head> on your theme.liquid. Amazingly it works across the page.  I did not use private captcha key

 

<script src="https://www.google.com/recaptcha/api.js?render=_reCAPTCHA_site_key"></script>
<script>
grecaptcha
.ready(function() {
    grecaptcha
.execute('_reCAPTCHA_site_key_', {action: 'homepage'}).then(function(token) {
       
...
   
});
});
</script>

 

You will not see the recaptcha box first but after you click submit, you will be prompted with it follows with photos quizz

1 Like
Highlighted
Tourist
6 0 1

An update from my previous comment.

 

"Currently, on Shopify, a Captcha is set to appear on both your newsletter and contact form signups when there are two submissions done from the same IP address within 24 hours"   from Shopify staff response.

 

Hence Contact us form and Newsletter are already set for Captcha  if you tried more than once in 24 hrs on the same ip address.

0 Likes
Highlighted
Explorer
49 1 9

Thank you so much for such great step by step instruction.   For me it works except....  when you click to submit the form  it jumps down to the bottom of the screen that shows the captcha form, therefore, unless the customer scrolls up, they will not see the captcha form to check the box.
I wonder if there's any way to change that.  Is this the behavior anyone else is seeing?
Thanks

0 Likes