DEV Community

loading...
Cover image for # Migrate to google captcha to v3. No more "No, I am not a robot"

# Migrate to google captcha to v3. No more "No, I am not a robot"

Babacar Cissé Dia
passionate about technology especially in WEB (front end and back end), desktop and mobile application from native to hybrid one. ML is the new black
・2 min read

google captcha migration to v3. No more "No, I am not a robot"

If you did not have one, you will need to create an app here:
Google create

  • no more captcha. Verification happen under the hood

    • before: form before
    • after: form after
  • You can check google answer

    google response

    I consider action: "contactPage", score > .8 to be a valid request. You can use your own

You can give the user ip as optional param. (I don't. Google has already enough data on us)

The front end code front
The back end code back
Yes I am using @laravelphp.

I also added a new page /contacted to have a better reporting from google analytics conversion for specific goals. Don't worry I protected it, you can't access it except you are coming from the contact form twitter
Let me elaborate: Having a specific page where the user is being redirected is a good practice for analytics since you can then record the hits you are getting from that specific page (for me /contacted). You can have the same for user registration /registred

Wrap up

It was amazingly fast. The migration v2 -> v3 is straightforward. So if you did not, go ahead it is less than 5min.
Next step for me is to add it on my login form as well.
Happy coding!

Resources:

Discussion (0)