Get consent for promotional emails with customer registration

Follow this tutorial if you want to add a subscription field for marketing and promotional emails. This gives your customers the opportunity to opt out or in as they choose.

Capture consent promotional emails
  1. From your Shopify admin, click Online Store, and then click Themes (or press G W T).

  2. Find the theme you want to edit, click the ... button, and then click Edit HTML/CSS.

  3. Under Templates, click on customers/register.liquid to open the account creation template in the Edit HTML/CSS page.

  4. Locate the div element that contains the password field:

    <div id="password" class="clearfix form-row">
      <label for="password" class="login">Password</label>
      <input type="password" name="customer[password]" id="password" />
    </div>
    

    Right below that, add the following checkbox code:

    <div>
      <input type="hidden" name="customer[accepts_marketing]" value="" />
      <input type="checkbox" name="customer[accepts_marketing]" checked="checked" />
      Subscribe to stay updated with new products and offers!
    </div>
    
  5. Save your file, then visit your account creation form page at http://your.shop.url/account/register.

When a customer creates an account with the promotional checkbox checked, their customer page in your store's admin will look like this:

Capture consent promotional emails 2

When customers create an account with the checkbox un-checked, you'll see this:

Capture consent promotional emails 3

Want to discuss this page?

Visit the Shopify Community