Skip to main content

MailerLite Integration

Connect OneTap Login to MailerLite to automatically add Google sign-in users to your email list.

Prerequisites

  • MailerLite account (free tier available)
  • At least one group created
  • API key generated

Step 1: Get MailerLite API Key

1.1 Access Integrations

  1. Log into MailerLite
  2. Click Integrations in the sidebar
  3. Click API

1.2 Generate API Token

  1. Click Generate new token
  2. Name it "OneTap Login"
  3. Copy the token

API Token Format:

eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9...
API Version

Make sure you're using the new API (v2). The token starts with eyJ.

Step 2: Get Group ID

2.1 Find Your Group

  1. Go to Subscribers > Groups
  2. Click on your target group
  3. Look at the URL

2.2 Copy Group ID

The Group ID is in the URL:

https://dashboard.mailerlite.com/groups/12345678/subscribers
^^^^^^^^
Group ID

Or via API settings:

  1. Go to Integrations > API
  2. Find group ID in the documentation

Step 3: Configure OneTap Login

3.1 Access Settings

  1. Go to WordPress Admin
  2. Navigate to Settings > OneTap Login
  3. Click Integrations tab
  4. Find Email Marketing section

3.2 Enter Credentials

MailerLite Settings

  1. Enable Email Marketing: Toggle on
  2. Provider: Select MailerLite
  3. API Key: Paste your API token
  4. Group ID: Paste your Group ID

3.3 Test Connection

  1. Click Test Connection
  2. Verify success message
  3. Click Save Changes

Configuration Options

Double Opt-in

Configure in MailerLite:

  1. Go to Forms > Settings
  2. Enable Double opt-in
  3. Customize confirmation email

OneTap Login adds subscribers as "unconfirmed" when DOI is enabled.

Subscriber Fields

MailerLite receives:

OneTap FieldMailerLite Field
Emailemail
First Namename (first part)
Last Namename (last part)

Custom Fields

If you have custom fields in MailerLite:

  1. Create field in MailerLite
  2. Map in OneTap settings (if available)
  3. Or use automations to populate

Subscriber Status

With Double Opt-in

New subscriber → status: "unconfirmed"

Confirmation email sent

User clicks confirm

Status: "active"

Without Double Opt-in

New subscriber → status: "active"

Verification

Check Subscriber

  1. Go to MailerLite Subscribers
  2. Search for test email
  3. Verify subscriber exists
  4. Check group membership

Check Activity

  1. Click on subscriber
  2. View Activity tab
  3. See subscription event

API Rate Limits

MailerLite limits:

  • 120 requests per minute
  • Generous for typical use

OneTap Login makes one request per registration.

Error Messages

"Invalid API Key"

Cause: Wrong or expired API token.

Solution:

  1. Generate new API token
  2. Ensure using API v2 token
  3. Copy full token

"Group Not Found"

Cause: Wrong Group ID.

Solution:

  1. Verify Group ID in MailerLite
  2. Check group isn't deleted
  3. Use numeric ID, not name

"Subscriber Already Exists"

Cause: Email already in MailerLite.

Solution: Normal behavior. Existing subscribers are updated, not duplicated.

"Validation Failed"

Cause: Invalid email format.

Solution: Check email address is valid. Google emails should always be valid.

MailerLite-Specific Features

Segments

Create segment of Google users:

  1. Go to Subscribers > Segments
  2. Create new segment
  3. Condition: Group is [your group]

Automations

Trigger automation on subscription:

  1. Create automation in MailerLite
  2. Set trigger: When subscriber joins a group
  3. Select your Google signup group

Landing Pages

MailerLite offers landing pages. Consider:

  • Custom Google signup landing page
  • Post-signup redirect to landing page

Integration Code

How OneTap Calls MailerLite

// Simplified example
$response = wp_remote_post(
'https://connect.mailerlite.com/api/subscribers',
[
'headers' => [
'Authorization' => 'Bearer ' . $api_key,
'Content-Type' => 'application/json'
],
'body' => json_encode([
'email' => $email,
'fields' => [
'name' => $first_name . ' ' . $last_name
],
'groups' => [$group_id],
'status' => 'unconfirmed' // or 'active'
])
]
);

Troubleshooting

Connection Test Fails

  1. Verify API token is v2 (starts with eyJ)
  2. Check token hasn't been revoked
  3. Ensure account is active
  4. Try generating new token

Subscribers Not Appearing

  1. Check DOI: User may need to confirm
  2. Verify correct group selected
  3. Check MailerLite spam/bounced list
  4. Review OneTap debug logs

Group Not Updating

  1. Verify Group ID is numeric
  2. Check group still exists
  3. Ensure API has write permissions

MailerLite Classic vs New

OneTap Login supports the new MailerLite (connect.mailerlite.com).

If using MailerLite Classic:

  • Migrate to new MailerLite
  • Or contact support for classic API key format

Best Practices

Do's

  • Enable double opt-in
  • Create dedicated group for Google signups
  • Set up welcome automation
  • Monitor deliverability

Don'ts

  • Don't use Classic API keys
  • Don't delete the signup group
  • Don't share API tokens

Next Steps