Add tag to customer based on selection in registration

Hi, i want to be able to let me customers choose what type of emails they get. so i want the selection they choose to add the coresponding tag to their profile.

for example i want it to be a selection of these options below.

Receive Emails about specials and discounts?

Sign me up for all emails (subscribes to email marketing)

Sign me up for upholstery emails only (subscribes to email marketing and adds tag “upholstery emails”)

Sign me up for window treatment emails only (subscribes to email marketing and adds tag “window treatment emails”)

No don’t sign me up. I don’t want discounts. (does not subscribe to marketing)

here is my current customer registration code, and at the bottom ill include a screenshot of how it should pretty much look. (my website is alanrichardtextiles.com )

{%- liquid
  assign NS = 'customer-form'
  assign cn = '#' | append: NS  
-%}

{% render 'load-css', file: NS %}

  # 
    {{ 'customer.register.title' | t }}
  
  {%- form 'create_customer', novalidate: 'novalidate' -%}
    {%- if form.errors -%}
      
        {%- assign alert_heading = 'templates.contact.form.error_heading' | t -%}
        {%- capture Alert_text -%}
          

            {%- for field in form.errors -%}
              - {%- if field == 'form' -%}
                    {{ form.errors.messages[field] }}
                  {%- else -%}
                  
                      {{ form.errors.translated_fields[field] | capitalize }}
                      {{ form.errors.messages[field] }}
                  
                  {%- endif -%}
              
            {%- endfor -%}
          

        {%- endcapture -%}
        {% render 'alert',
          type: 'danger',
          heading: alert_heading,
          text: Alert_text
        %}
      

    {%- endif -%}
    
      
    

    
      
    

    
      
    

    
      
    

 
      
    

    
      {% render 'button',
        t_text: 'customer.register.submit',
        shadow: true,
        block: true,
        size: 'h4'
      %}
      
        {{ 'customer.login_page.sign_in' | t }}
      
    

  {%- endform -%}

{% schema %}
{
  "name": "Register"
}
{% endschema %}

ok so after going back with AI a bit i managed to figure it out. if anyone else is trying to do this you can probably just take this code and modify it for your setup.