Get consent for promotional emails when customers register

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. In the Templates directory, click customers/register.liquid.

  2. 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 }}">
  3. Just below the code that contains the password field, add the following code:

      <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!
  4. Click Save.

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

Email marketing states

If a customer opts into email marketing when they create an account, then you see the Email marketing status is set to Subscribed on their customer page in your Shopify admin.

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 not show the Accepts email marketing message.

Ready to start selling with Shopify?

Try it free