Determine Webpage Signup Location

If you embed your signup form on multiple webpages like a homepage, a contact page, and a product site, you may want to find out where subscribers signed up.

To do this, you'll edit your form to include a hidden field that pre-fills a webpage location value, like homepage or contact page. This value will appear in the profile of new subscribers from the embedded form. Later, you can use this location value to segment your audience and send targeted content to subscribers who came from a certain page.

In this article, you'll learn how to track signup locations with Mailchimp's embedded signup form.

Before You Start

  • Use the process described in this article only if you want more details about the page where embedded form subscribers are coming from. If you want to see how subscribers signed up, like through the hosted form, embedded form, or an integration like Facebook, segment your audience by signup source instead.
  • This is an advanced feature and is recommended for users familiar with custom coding. Contact your developer or hire a Mailchimp Expert if you need assistance.

Task Roadmap

This is a multi-step process, and you'll need to complete these steps in order.

  • Add a hidden text field to your signup form in Mailchimp.
  • Copy the form's embed code.
  • Edit the form for each webpage you want it to appear on.

After the form is updated and added to webpages on your site, you can test your form, and create auto-update segments to organize new subscribers by webpage signup location.

Add a Hidden Field

To get started, you'll add a hidden text field to your form.

  1. Navigate to the Audience tab.
  2. If you have more than one audience, click the Current audience drop-down and choose the one you want to work with.
  3. Click the Manage Audience drop-down and choose Signup forms.
  4. Select Form builder.
    Select general forms
  5. Click the Forms and response emails drop-down menu, and choose Signup form.
  6. Navigate to the Build it tab.
    A screenshot of the form builder's Build It tab.
  7. Look for the Add a field tab, and click Text.
    A text field in the form builder
  8. On the Field settings tab, input a Field name and Field tag.
  9. Under Field visibility, click Hidden.
  10. Click Save Field.

Now that you've added a hidden field to your form, you'll copy the form's embed code.

Get the Embed Code

To copy the form's embed code, follow these steps.

  1. From the Form Builder, click Signup forms.
  2. Select Embedded forms.
    Select embedded forms
  3. Choose Classic, Condensed, Horizontal, or Unstyled from the form options.
    embedded forms EnabledGDPR tabs
  4. Under the Copy/paste onto your site heading, click the code to highlight your form. Use CTRL+C or CMD+C on your keyboard to copy it.

Before you post the embed form code on your site, you'll add one small piece of code into your form that will prefill the hidden field with the location information you provide.

Modify Embed Code

To modify the form code, follow these steps.

  1. Paste the form code into a HTML or plain-text editor, and use CTRL+F or CMD+F on your keyboard to search for "form action." You'll find it near the beginning of your form's code. This is your form action URL, which will look similar to this example.

    form action="//
  2. At the end of the code for your form action URL, add &MERGE=value. Replace MERGE with your hidden field's tag, and replace value with the form location information you'd like to send to Mailchimp. For example, to prefill the value Homepage in a hidden field called SIGNUP, add &SIGNUP=Homepage to the end of the form action URL.

  3. After you update the form, copy the code, and paste it onto your site.

Repeat steps 1-3 to edit additional copies of the code for each page where you want to embed the form.

Test Your Form

To test your updated signup form, fill it out completely on your site and submit it. If you've pasted the form in several places, use different email addresses for each test submission.

After you've confirmed your subscription, search Mailchimp for your contact profile, then find your hidden field's label and look for the value you used. If everything is set up correctly, your profile will have signup location information in this field.

Example of signup location information.

Create Segments

Most people use data from prefilled hidden fields to create segments that track where subscribers came from. Create a segment to show all subscribers whose default merge tag value is "Homepage," "MarketingSite," or any other hidden text value you prefilled in your embedded forms. Remember, segments based on text fields are case-sensitive.

A screenshot of choosing the segment criteria to create a signup location segment.

To keep track of signups from a specific page, save the segment. When new subscribers sign up on your embedded form, we'll automatically add them to the segment you created.

Was this article helpful?

Anything else we can do to improve our site?