Marketing Opt in on New Account Page Not Working

Hi there! On Canopy theme I want to use marketing opt-ins on customer account creation pages, and I can not for the life of me get it work. I have added the opt in box under the password label but no matter how many times I try to create a new account with the box checked, the new account still says “not subscribed”. Is there a way to fix this? Am I missing something?

This is the code I’m using under the main-register.liquid

<div class="marketing-optin" style="margin-bottom: 1rem;">
  <label for="marketing_opt_in" class="checkbox-label">
    <input type="checkbox" name="accepts_marketing" id="marketing_opt_in" value="1" checked>
    Subscribe to our newsletter and unlock The Study 🌿
  </label>
</div>

Hey! I’ve seen this happen on Canopy before — the checkbox alone usually isn’t enough. Shopify needs the value posted in a specific way, and sometimes the theme needs a tiny tweak to trigger the subscription correctly. You can try adjusting your input like this:

<form method="post" action="/account" id="create_customer" accept-charset="UTF-8">
  {{ form | hidden_fields }}
  
  <div class="marketing-optin" style="margin-bottom: 1rem;">
    <label for="marketing_opt_in" class="checkbox-label">
      <input type="checkbox" name="customer[accepts_marketing]" id="marketing_opt_in" value="1" checked>
      Subscribe to our newsletter and unlock The Study 🌿
    </label>
  </div>

  <button type="submit">Create account</button>
</form>

Notice the customer[accepts_marketing] part — that’s often what trips people up.