Email consent
There are two ways that a customer can consent to email marketing through the theme:
Newsletter sign-up form
Anchor link to section titled "Newsletter sign-up form"You can add a newsletter sign-up form to your theme with the Liquid form tag and accompanying 'customer'
parameter. Inside the form, you need to include an input with the following attributes:
Attribute | Value |
---|---|
type |
email |
name |
contact[email] |
For example:
When a customer signs up through this form, a customer will be created with the entered email, and the accepts_marketing
attribute of the associated customer
object will be set to true
.
Customer registration form checkbox
Anchor link to section titled "Customer registration form checkbox"Inside the customer register form, you can include a checkbox to allow customers to consent email marketing. This requires the following inputs to be placed inside the form:
Input | type | name |
---|---|---|
Accepts marketing | hidden |
customer[accepts_marketing] |
Accepts marketing | checkbox |
customer[accepts_marketing] |
For example: