Add reCAPTCHA in Shopify

The necessary code for the reCAPTCHA functionality is included through the content_for_header object. This means that if a merchant has reCAPTCHA enabled, but the content_for_header object is not present, then the reCAPTCHA functionality won’t be present.

The reCAPTCHA functionality is initialized based on the presence of customer, contact, and blog comment forms, and is triggered when the forms are interacted with. For example, the functionality is triggered when a user clicks into a text field of an associated form.

These forms are identified based on the action attribute of the form, as well as specific input attributes: /account, /contact, /blogs.

<form action="/account/login" ...>
  <input type="hidden" name="form_type" value="customer_login">