Is there some way to add custom tag to new subscriber automatically?

cottercat

New Member
I would like to have 1 list for all new subscribers, but would like to be able to identify where each subscriber came from. Is there some way to automatically add a custom tag (ex: site1) to a subscriber who opts into the list from Website 1 and a different tag (ex: site2) to a subscriber who opts in from Website 2?

If not using custom tags, is there some other way to do this.

It's going to be very messy if I have to create lists for every website I have optin forms, and yet send the same autoresponder messages to all those lists. Much easier if they can all be on 1 list.

Crossing my fingers there's a way to do this! Thanks for your feedback.
 

twisted1919

Administrator
Staff member
You can create a new custom field, called, let's say "WEBSITE_SOURCE" which by default is empty or something.
Then in MailWizz, go and take the generated subscription form to embed it in your site, which looks smth like:
Code:
<form action="https://mailwizz-site.com/index.php/lists/cc432jc15q271/subscribe" method="post">
      <div class="box box-primary borderless">
        <div class="box-header">
          <h3 class="box-title">
            TEST
          </h3>
        </div>
        <div class="box-body">
          <div class="callout callout-info">
            We're happy you decided to subscribe to our email list.<br />
            Please take a few seconds and fill in the list details in order to subscribe to our list.<br />
            You will receive an email to confirm your subscription, just to be sure this is your email address.
          </div>
          <div class="form-group field-text wrap-email">
            <label for="EMAIL" class="required">Email <span class="required">*</span></label> <input class="form-control field-email field-type-text" placeholder="Email" type="text" value="" name=
            "EMAIL" id="EMAIL" />
          </div>
          <div class="form-group field-text wrap-website_source">
            <label for="WEBSITE_SOURCE">Source</label> <input class="form-control field-website_source field-type-text" placeholder="Source" type="text" value="" name="WEBSITE_SOURCE" id="WEBSITE_SOURCE" />
          </div>
        
          <div style="position: absolute; left: -5000px;" aria-hidden="true">
            <input type="text" name="f0544500f3eb1d9d92df6670383f4074a8fed320" tabindex="-1" autocomplete="f0544500f3eb1d9d92df6670383f4074a8fed320" value="" />
          </div>
          
          <div class="clearfix">
            <!-- -->
          </div>
        </div>
        <div class="box-footer">
          <div class="pull-right">
            <input type="submit" class="btn btn-primary btn-flat" name="yt0" value="Subscribe" />
          </div>
          <div class="clearfix">
            &nbsp;
          </div>
        </div>
      </div>
    </form>
Now, you don't want this field (WEBSITE_SOURCE) visible, but you want it shown in the form, so just add style="display:none" to the wrapper, so:
Code:
<div class="form-group field-text wrap-website_source" style="display:none">
Next, you want this field populated based on the source where the subscriber comes from, so you can pre-populate fields based on the query strings, which means, you can change your form action url, like:
Code:
<form action="https://mailwizz-site.com/index.php/lists/cc432jc15q271/subscribe?WEBSITE_SOURCE=my-first-website" method="post">

So in the end, your form for the first website will look like:

Code:
<form action="https://mailwizz-site.com/index.php/lists/cc432jc15q271/subscribe?WEBSITE_SOURCE=my-first-website" method="post">
      <div class="box box-primary borderless">
        <div class="box-header">
          <h3 class="box-title">
            TEST
          </h3>
        </div>
        <div class="box-body">
          <div class="callout callout-info">
            We're happy you decided to subscribe to our email list.<br />
            Please take a few seconds and fill in the list details in order to subscribe to our list.<br />
            You will receive an email to confirm your subscription, just to be sure this is your email address.
          </div>
          <div class="form-group field-text wrap-email">
            <label for="EMAIL" class="required">Email <span class="required">*</span></label> <input class="form-control field-email field-type-text" placeholder="Email" type="text" value="" name=
            "EMAIL" id="EMAIL" />
          </div>
          <div class="form-group field-text wrap-website_source" style="display:none">
            <label for="WEBSITE_SOURCE">Source</label> <input class="form-control field-website_source field-type-text" placeholder="Source" type="text" value="" name="WEBSITE_SOURCE" id="WEBSITE_SOURCE" />
          </div>
        
          <div style="position: absolute; left: -5000px;" aria-hidden="true">
            <input type="text" name="f0544500f3eb1d9d92df6670383f4074a8fed320" tabindex="-1" autocomplete="f0544500f3eb1d9d92df6670383f4074a8fed320" value="" />
          </div>
          
          <div class="clearfix">
            <!-- -->
          </div>
        </div>
        <div class="box-footer">
          <div class="pull-right">
            <input type="submit" class="btn btn-primary btn-flat" name="yt0" value="Subscribe" />
          </div>
          <div class="clearfix">
            &nbsp;
          </div>
        </div>
      </div>
    </form>
This is a bit of a hack, but it should do the work for a start...
You can also use the API which will work much better, but that requires programming experience...

With the above, you will see that in the mailwizz website, the WEBSITE_SOURCE field is still visible... and you might not like that, because people could then change it's value. If that's the case, we can tell you how to hide it there as well.
In MailWizz 2.0, we added a new field visibility flag which takes care of this automatically, but here in 1.x, it's a bit more difficult to make that work, so we need to tell you how to do it.

Anyway, hope it helps you get started.
 
Top