Add a tag to a customer - Account Sign Up Form

Hi there,

I’m trying to add a tag to customers when they sign up for an account on a landing page.

Below is the form code, and I’ve added in however this is not adding a tag when I sign up. Am I using the wrong code or placing it in the wrong spot?

Thanks in advance!


  # {{ 'customer.register.title' | t }}
  

  

    

    

      
      

        {% form 'create_customer' %}
       
          {{ form.errors | default_errors }}

          

            
            
          

          
            
            
          

          
            
            
          

          
            
            
             
          

          {% if section.settings.text %}
            {{ section.settings.text }}
          {% endif %}

          
            
            
          

          
            {% if section.settings.cart_opt_in_tag_value %} 
            {% if section.settings.show_opt_in %}{% endif %}
            {% endif %}
          

          
            
            

              {{ 'customer.register.returning_customer_label' | t }} {{ 'customer.register.sign_in_html' | t }}
            

          

        {% endform %}
      

    

  

{% schema %}
  {
    "name": "Register",
    "class": "register-section",
    "settings": [
      {
        "type": "richtext",
        "id": "text",
        "label": "Text"
      },
      {
        "type": "header",
        "content": "Extra opt-in checkbox."
      },
      {
        "type": "paragraph",
        "content": "Use this to include an additional opt-in box, which can be used to identify customers in Shopify."
      },
      {
        "type": "text",
        "id": "cart_opt_in_tag_value",
        "label": "Value of tag",
        "default": "Join the spice club",
        "info": "This is the value of that field."
      },
      {
        "type": "text",
        "id": "cart_opt_in_box_description",
        "label": "Label for checkbox",
        "default": "Join the spice club"
      },
      {
        "type": "checkbox",
        "id": "show_opt_in",
        "label": "Show checkbox to opt-in",
        "default": true,
        "info": "If this is not checked, all users will be opted-in."
      },
      {
        "type": "text",
        "id": "cart_opt_in_tag_name",
        "label": "Opt-in tag name",
        "default": "Cart opt-In",
        "info": "Think of this as the field name. This will be automatically set, if you would like customers to check a box, this is a different feature."
      }
    ]
  }
{% endschema %}
2 Likes

@INFRA

sorry for that issue but its not possible to auto added customer tag its mandatory to add customer tag add manual

hi @KetanKumar what do you mean exactly? Can I not add any tag to a customer who signs up for an account? I just want to add the tag ‘spice-club-member’.

1 Like

@INFRA

no sorry that’s not possible customer tag add only manual

Hi @KetanKumar just double checking; this article for example would not be correct in saying that you can add a tag?

https://www.blackbeltcommerce.com/add-tag-customer-account-registration-form-shopify/

1 Like

@INFRA

thanks for url but its allow this tag on customer note

auto tag not possible sorry

Hi @INFRA ,

I m not qualified enough to debug the code, but are you looking to auto-tag customers who have created account on your Shopify store?

I think you give this app Auto Tags a try, this one has a great set of workflows to tag customers based on different conditions.

For example, They have a workflow to automatically “Tag customers who have created an account” and many more.

I thought this may be of some help…

1 Like

It seems to work fine for me. The one difference I see to your code is the id.

I have tested this and it works

I know I am late to the party, but I managed to autotag customers using contact[tag] instead of customer[tag].

Here’s my code as an example, and how it displays

{% form 'customer' %}

{{ form.errors | default_errors }}

<div class="email field">
<input type="email" name="contact[email]" class="field__input" placeholder="Email">
<label class="field__label" for="email">Email</label>
</div>

<div>
<input class="button button--full-width submit" type="submit" value="Notify me on launch">
</div>

<input type="hidden" id="contact_tags" name="contact[tags]" value="Canada"/>

{% endform %}
1 Like

Hi, do these works for account sign up as well? Or is there any other code that will work on this?

1 Like

I don’t know, sorry.

Just try it out with both contact[tag] and customer[tag] and see if the tags show up on the customer page.

1 Like