Get consent for promotional emails during customer registration

You can add a checkbox to your customer account creation form that lets customers indicate whether they want to receive newsletters, promotional emails, or other marketing material from your store.

Promotional email checkbox

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

  2. In the Templates directory, click customers/register.liquid.

  3. Find the code that contains the password form field. The code will look similar to this:

    <label for="CreatePassword" class="label--hidden">{{ 'customer.register.password' | t }}</label>
    <input type="password" name="customer[password]" id="CreatePassword" class="input-full {% if form.errors contains 'password' %} input--error{% endif %}" placeholder="{{ 'customer.register.password' | t }}">
    
  4. Just below the code that contains the password field, add the following 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. Click Save.

  6. You can view your customer account creation form by visiting the following URL: http://your-shop-url/account/register.

If a customer creates an account with the promotional checkbox checked, then their customer page in your admin will show an Accepts email marketing message:

Results in the admin when checkbox checked

If a customer creates an account with the promotional checkbox unchecked, then their customer page in your admin will look like this:

Results in the admin when checkbox unchecked

Want to discuss this page?

Visit the Shopify Community