Automatically add 3 tags on customer account signup

YKHi
Visitor
2 0 0

Hi there,

I'm using Shopify and Shopify Mail to do email marketing to my customers.
I am trying to create our own account registration form in liquid.
When a customer creates an account in my Shopify store, I want to automatically add 3 tags for the customer based on their responses.

Example
Question 
 1.What country do you live in?(pull-down)
 2.What is your gender?(pull-down)
 3.What is your age?(date)

Answer
 1. Australia
 2.no answer
 3.1990-01-01

Tags
 [Japan][no answer][1990-01-01]


I have tested this and when I create an account, only one tag entered at the end goes into the customer tag.
Is it possible to automatically add the 3 tags when a customer creates an account, depending on what the customer answers? If so, what are the steps/html to accomplish this?

 

Thanks,

Replies 5 (5)

PaulNewton
Shopify Partner
6274 572 1311

What does your current form structure look like, what approach are you trying to use?

<input type="text" name="customer[tags][tag-1]" value="" />
<input type="text" name="customer[tags][tag-2]" value="" />

Are you adding the tags as comma separated?

<input type="text" name="customer[tags]" value="value="Japan,no answer, 1990-01-01"" /> 

 

Save time & money ,Ask Questions The Smart Way


Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to eff.org


YKHi
Visitor
2 0 0

Thanks for your advice.

After a lot of testing based on your advice, I solved the problem with the following method.

I used Vue.js to be able to send data by concatenating multiple items with commas.

<input type="hidden" name="contact[tags]" :value="date">

 

Thank you very much.

subjectmatter
Shopify Partner
8 0 2

Hey @YKHi ,

 

I'm trying to do something similar. Can you explain a bit more on how you did it?

 

Thanks

Kani
Shopify Partner
468 125 221

Hi @subjectmatter 

Please check this post

https://community.shopify.com/c/technical-q-a/automatically-add-a-tag-to-a-customer-based-on-what-th...

Hey!! ʕ ᵔᴥᵔ ʔ
Please click 'Like' and ' Accept as Solution' to encourage me to continue sharing my expertise. ♡
If you need any technical assistance, feel free to send me a DM. You no longer have to search for answers without getting a response. 🙂
Isabelle2022
Excursionist
18 0 5

Hello, I'm having a similar issue, I would like to automatically apply the product tags to the customer tags after checkout. Is there a way to link them after the customer purchased the products?