Loading
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Add reCAPTCHA Verification to Your Guest Referral Site

          Add reCAPTCHA Verification to Your Guest Referral Site

          Add markup and Google’s secret key to your guest referral Experience Cloud site.

          Required Editions

          Available in: Lightning Experience

          Available in: Enterprise and Unlimited Editions with Health Cloud

          User Permissions Needed
          To set up an Experience Cloud site:

          Create and Set Up Experiences

          AND

          View Setup and Configuration

          To create, read, update, and delete trusted URLs: Customize Application or Modify All Data
          1. From Setup, in the Quick Find box, enter Digital Experiences, and then select All Sites.
          2. Click Builder next to your guest referral site.
          3. In Settings, click Advanced settings, and then click Edit Head Markup.
          4. Enter this markup.
            This markup renders the reCAPTCHA component and sets the component up to fire events related to reCAPTCHA verification.
            <script src="https://www.google.com/recaptcha/api.js"></script>
            <script type="text/javascript">
                document.addEventListener('grecaptchaRender', function(e) {
                    grecaptcha.render(e.detail.element, {
                        'callback': e.detail.callback,
                        'expired-callback': e.detail.expiredCallback,
                        'error-callback': e.detail.errorCallback,
                        'sitekey' : e.detail.sitekey
                    });
                });
                document.addEventListener('grecaptchaReset', function(e) {
                    grecaptcha.reset();
                });
            </script>
            
          5. Save your changes and then publish the site.
            When you add the Create Referral Omniscript to your site and publish the site, the Create Referral form shows the "I'm not a robot" checkbox and you must select it before you can submit the form.
           
          Loading
          Salesforce Help | Article