Skip to main content

How to target MailerLite groups and fields in Mida

Connect MailerLite and show an A/B test or a personalization only to the subscribers in the groups, and with the fields, you choose.

Connect MailerLite and Mida can show an A/B test or a personalization only to the subscribers you choose, by group or field. You paste one API token and add a short piece of text to the links in your MailerLite emails. There is no code to add to your site.

It also works the other way: Mida can save a survey answer, or any other attribute you choose, onto the subscriber in MailerLite.

Plan: targeting by MailerLite audience needs a paid Mida plan.

Note: this works with the current MailerLite. MailerLite Classic accounts are not supported.

How it works

The short version: you add ?md_ml={$email} to the links in your MailerLite emails. MailerLite fills in the subscriber's email when it sends. When they click through, Mida looks the subscriber up in your account and saves their groups and the fields you picked on their Mida visitor. Your targeting rules then read those values.

A finished link looks like this before MailerLite sends it:

https://yoursite.com/pricing?md_ml={$email}

After the visitor lands, Mida removes md_ml from the address bar. It keeps only MailerLite's subscriber ID in the browser, never the email address.

What Mida copies

Data

What is copied

Name in Mida

Groups

Every group in your account, saved as true when the subscriber is in it and false when they are not. Always on.

ml_group_ plus the group name, for example ml_group_customers

Fields

Only the fields you tick.

ml_ plus the field key, for example ml_company

Status

Only if you tick it. It is active, unsubscribed, unconfirmed, bounced or junk.

ml_status

Group names are turned into lower case with underscores, so "Trial Users" becomes ml_group_trial_users. You do not have to work these out. Mida lists the exact name next to each group, and you can click it to copy.

MailerLite segments are not available, only groups. If you need a segment, put its subscribers in a group and target the group.

When targeting applies

  • Targeting applies from the visitor's next page view, not the page they land on from the email. The lookup runs in the background so it never slows your page or delays a test.

  • Mida keeps a person's data for up to 6 hours before asking MailerLite again. A change you make in MailerLite can take that long to show up in Mida.

  • Mida remembers the person in that browser, so they stay recognized on later visits. Another browser or device needs its own click from an email.

  • Visitors who never clicked one of your MailerLite emails stay anonymous and do not match any MailerLite rule.

Before you start

  1. Create an API token. In MailerLite, open Integrations, then API, and generate a new token. Copy it straight away, because MailerLite shows it only once.

  2. Make sure the Mida tag is installed on the pages your emails link to.

Connect MailerLite

  1. In Mida, open Integrations and choose MailerLite under Marketing & Email.

  2. Click Enable MailerLite Integration.

  3. Open the Config tab.

  4. Paste the token into API token and click Connect.

  5. When it says Connected, tick the fields you want to use under Attributes to bring in, then click Save attributes. You can pick up to 40.

Only an Owner or Admin can connect, replace the token, or disconnect. Groups need no setup: all of them are brought in.

Add the ID to your email links

In each MailerLite email or automation, add this to the end of every link that goes to your site:

?md_ml={$email}

  • If the link already has a ? in it, start with & instead of ?.

  • If the link ends with a #section part, put the text before the #.

  • You can copy the exact text from the MailerLite Config tab in Mida.

  • It only works on links in emails MailerLite actually sends. In a preview the value is usually not filled in.

  • MailerLite replaces {$email} with the subscriber's email address. Keep links that contain it private until they are sent.

Target a test or a personalization

  1. Open your test and go to Targeting.

  2. Add a Segment rule.

  3. In the attribute field, type the name from the MailerLite Config tab.

  4. Choose a condition and a value, then save.

You want to reach

Attribute

Condition

Value

Subscribers in your "Customers" group

ml_group_customers

Is true

Known subscribers who are not in "Customers"

ml_group_customers

Is false

Subscribers whose "company" field is Acme

ml_company

Is equal to

Acme

Active subscribers only

ml_status

Is equal to

active

Everyone Mida has recognized from MailerLite

ml_group_customers (any group)

Exists

A few things to know about conditions:

  • To target people who have something use Is true. To target known contacts who do not have it use Is false.

  • Anonymous visitors never match one of these rules, including "Is false" and "Does not exist". Mida knows nothing about them, so it leaves them out.

  • Text conditions are case sensitive. "Pro" and "pro" are different values.

  • All values arrive as text. Number and date conditions still work as long as the value looks like a number or a date.

For the full list of conditions, see How to use Segment & Event Filtering.

Send Mida attributes to MailerLite

Mida can also save attributes onto the matching subscriber in MailerLite. The usual case is a survey: a visitor answers "What is your team size?" on your site, and the answer is saved on their MailerLite subscriber, where your emails and automations can use it.

There is nothing extra to connect. MailerLite is written with the key you already pasted.

  1. In MailerLite, create a field for each attribute you want to receive, if it does not exist yet. Note its key, which is lower case with underscores, for example team_size.

  2. In Mida, open the MailerLite Config tab. Under Send Mida attributes to MailerLite, tick the attributes you want to send, then click Save. You can pick up to 20.

What you can pick from

  • Survey answers: every question with Save the answer to the visitor turned on, shown with the question and its survey.

  • Attributes on your visitors: names Mida has seen on your recent visitors, for example ones you set with mida.identify(), with how many visitors carry each.

  • If an attribute has not reached a visitor yet, type its name in Not listed? and click Add.

The name must be the key of a field that already exists in MailerLite. A name with no matching field is ignored. Groups and subscription status are never changed.

How it behaves

  • It is only sent for visitors Mida has recognized from one of your MailerLite emails. Anonymous visitors are never sent.

  • If a visitor answers first and is recognized later, the answer is sent as soon as they are recognized.

  • Nothing is sent until a name is on the list. Mida never sends an attribute you did not list.

  • Mida never creates a new subscriber in MailerLite. It only updates ones that already exist.

  • The same value for the same subscriber is sent once an hour at most.

  • A value overwrites whatever was there before.

To stop, untick everything and click Save.

Test that it works

  1. Pick a group that applies to you, and create a test that targets it.

  2. Add the link text to an email and send it to yourself as a real send, not a preview.

  3. Before you click, hover over the link in your inbox. You should see md_ml= followed by a real value. If you see the placeholder text instead, MailerLite did not fill it in.

  4. Click the link in a normal browser window. Mida removes md_ml from the address bar once the page loads.

  5. Go to another page on your site, or reload. You should now be in the test.

Privacy and consent

  • Mida copies only what is listed above and the fields you tick. Nothing else is read into Mida.

  • In the other direction, Mida sends MailerLite only the attributes you list under Send Mida attributes, and only for recognized visitors.

  • The values are saved on the visitor in Mida and used for targeting only. They are not sent back to the visitor's browser.

  • If you use Strict Consent Mode, Mida does not read or store the contact ID until the visitor gives consent. If consent is withdrawn, the stored ID is removed from the browser.

  • Mida never creates a visitor from a MailerLite lookup, so this does not add to your monthly tracked users.

  • Your API key is encrypted at rest and never shown again after you paste it. Mida reads from MailerLite with it, and writes only if you list attributes to send.

  • When you disconnect, Mida deletes the stored key and stops looking people up. Values already saved on visitors stay there, but they are no longer refreshed.

Limits

Limit

Value

Fields you can bring in

40 per project

Length of a field value

200 characters. Longer values are cut.

Groups in your account that Mida tracks

200

How long a subscriber's data is reused before Mida asks MailerLite again

Up to 6 hours

New subscribers Mida looks up

About 60 a minute

Attributes you can send to MailerLite

20 per project

MailerLite limits how many requests a token can make each minute, and Mida stays under that. Right after a large campaign, some visitors may be recognized a page view or two later than usual.

Troubleshooting

What you see

What to check

"MailerLite rejected this key"

Generate a new token under Integrations, API, and paste the whole thing. Tokens are long. MailerLite Classic keys will not work.

The link in my inbox shows {$email} as text

The email was a preview. Send a real email and check again.

I clicked the email but I am not in the test

Targeting starts on the next page view. Load a second page. Also check the link had md_ml in it and check the test's other targeting rules.

Groups all show as false

Contact us in the chat. We would like to look at it with you.

A survey answer is not showing up in MailerLite

Check that a field with that exact key exists, that it is ticked under Send Mida attributes, and that the visitor clicked one of your MailerLite emails in that browser.

I changed a subscriber in MailerLite and Mida has not noticed

Mida reuses a subscriber's data for up to 6 hours.

FAQ

Does this work for visitors who never opened my emails?

No. Mida can only recognize someone after they click a link from one of your MailerLite emails. Everyone else is anonymous.

Do I need to change my emails?

Yes. MailerLite does not put a subscriber ID on links by itself, so you add the short text above to your links.

Will it slow down my site?

No. The lookup happens in the background after your page and your tests have loaded.

Can I connect more than one email platform?

Yes. A project can connect several, for example HubSpot as your CRM and another tool for email. Each is connected and set up on its own card. A visitor recognized by more than one gets each platform's data side by side, and an attribute you send goes to every platform that lists it.

Did this answer your question?