Re: Automatically add a tag to a customer based on what they choose when they sign up

Solved

Automatically add a tag to a customer based on what they choose when they sign up

hirot
Tourist
7 1 2

I'm looking for a way to tag a customer automatically based on an answer when they are signing up.

 

What I'm trying to do is

 

A customer chooses their body height when they sign up.

I'd like a tag the answer to the customer. For example, when they choose "4'9"" as their height, I'd like to tag "49" to the customer.

screenshot-elims-official-online-store.myshopify.com-2022.08.04-15_03_47.png

 

This person seemed to make it but I'm not sure how.

https://community.shopify.com/c/technical-q-a/automatically-add-3-tags-on-customer-account-signup/m-...

 

I know some apps would make it but would like to learn how to achieve by editing codes.

https://apps.shopify.com/customr?search_id=2dcef978-6668-4980-a2a9-cee34498a095&surface_detail=custo...

 

I'd tip you if I get an answer.

Thanks in advance.

Accepted Solution (1)

LitExtension
Shopify Partner
4860 1002 1159

This is an accepted solution.

Hi @hirot,

You can add the following code:

<select name="customer[tags][height]">
  <option value="49">4'9"</option>
  <option value="59">5'9"</option>
</select>

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify

View solution in original post

Replies 6 (6)

Kani
Shopify Partner
468 125 227

Hi @hirot 

1: you should find your 'customers/register.liquid' at first.

2: name those input as customer[tags][0] 、 customer[tags][1]

Kani_2-1659670268789.png

3: new form

Kani_3-1659670388114.png

4: Test result

Kani_4-1659670415408.png

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. 🙂
hirot
Tourist
7 1 2

Thank you for your solution! I just accepted the other one as an solution but your also works!

Kani
Shopify Partner
468 125 227

thank you let me know it works

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?

LitExtension
Shopify Partner
4860 1002 1159

This is an accepted solution.

Hi @hirot,

You can add the following code:

<select name="customer[tags][height]">
  <option value="49">4'9"</option>
  <option value="59">5'9"</option>
</select>

Hope it helps!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
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?