R
R
rinaz222020-06-08 18:36:35
reCAPTCHA
rinaz22, 2020-06-08 18:36:35

How to run recaptcha v3 immediately after loading the site?

Hello. I decided to keep up with the times and decided to install recaptcha 3 versions. I read what's new and learned that it is desirable to run the analysis immediately after loading the site so that google algorithms learn more about the visitor. With this, the question is, how can this be done? Just paste this code?

<script src="https://www.google.com/recaptcha/api.js?render=reCAPTCHA_site_key"></script>

And then get a response with this code:
<script>
      function onClick(e) {
        e.preventDefault();
        grecaptcha.ready(function() {
          grecaptcha.execute('reCAPTCHA_site_key', {action: 'submit'}).then(function(token) {
              // Add your logic to submit to your backend server here.
          });
        });
      }
  </script>

Or do you need it differently? Apologies in advance if this is a stupid question?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question