Newsletter subscription form without creating a customer

Solved
Highlighted
Tourist
3 1 0

I'm trying to create a newsletter subscription form that submits the user email to Shopify.
I've found a mutation that creates a customer but the password field is required so it's a no-go.

 

This must be feasible because when a user is checking out, the option to subscribe to the newsletter without registering is available (see screenshot below)

 

Screenshot 2020-05-20 at 16.06.18.png

 

Also, in the Shopify dashboard, under Customers, there is a specific tab (see screenshot below)

 

Screenshot 2020-05-20 at 16.01.18.png

 

 

Unfortunately, using a provider such as Klaviyo is out of discussion for us for CMR reasons

0 Likes
Highlighted
Shopify Staff
Shopify Staff
1040 139 163

Hey @livioataskphill 

 

If you're using the Online Store, you can create a subscription form with Liquid:

 

{% form 'customer' %}
  <input name="contact[tags]" type="hidden" value="newsletter" />
  <input name="contact[email]" type="text" placeholder="Enter your email" aria-label="Enter your email" />
  <input class="submit" type="submit" />
{% endform %}
0 Likes
Highlighted
Tourist
3 1 0

Thank you Scotty, I've forgotten to specify I'm working on a headless solution so no liquid is involved

0 Likes
Highlighted
Tourist
3 1 0

This is an accepted solution.

0 Likes