MailChimp Integration
Connect OneTap Login to MailChimp to automatically add Google sign-in users to your email list.
Prerequisites
- MailChimp account (free tier works)
- At least one audience (list) created
- API key generated
Step 1: Get MailChimp API Key
1.1 Access API Keys
- Log into MailChimp
- Click your profile icon (bottom left)
- Click Profile
- Click Extras > API keys
1.2 Create API Key
- Scroll to "Your API keys"
- Click Create A Key
- Name it "OneTap Login"
- Copy the key immediately
The API key is only shown once. Copy it immediately and store securely.
API Key Format:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-us1
The suffix (us1, us2, etc.) indicates your data center.
Step 2: Get Audience ID
2.1 Find Your Audience
- Go to Audience > All contacts
- Click Settings
- Click Audience name and defaults
2.2 Copy Audience ID
- Scroll to "Audience ID"
- Copy the ID
Audience ID Format:
a1b2c3d4e5
Step 3: Configure OneTap Login
3.1 Access Settings
- Go to WordPress Admin
- Navigate to Settings > OneTap Login
- Click Integrations tab
- Find Email Marketing section
3.2 Enter Credentials

- Enable Email Marketing: Toggle on
- Provider: Select MailChimp
- API Key: Paste your API key
- List ID: Paste your Audience ID
3.3 Test Connection

- Click Test Connection
- Verify "Connection successful" message
- Click Save Changes
Configuration Options
Double Opt-in
Enable DOI in MailChimp:
- Go to Audience > Settings
- Click Audience name and defaults
- Under "Form Settings"
- Enable Enable double opt-in
OneTap Login respects this setting automatically.
Tags
Add tags to new subscribers:
Setting: Tags to add
Example: google-signup, new-customer
Tags are created automatically if they don't exist.
Merge Fields
Map user data to MailChimp merge fields:
| OneTap Field | MailChimp Merge Field |
|---|---|
| First Name | FNAME |
| Last Name | LNAME |
| EMAIL (automatic) |
Standard merge fields (FNAME, LNAME) are used automatically.
Subscriber Status
With Double Opt-in Enabled
New subscriber → status: "pending"
↓
Confirmation email sent
↓
User clicks confirm
↓
Status: "subscribed"
With Double Opt-in Disabled
New subscriber → status: "subscribed"
Verification
Check Subscriber Added
- Go to MailChimp Audience > All contacts
- Search for the test email
- Verify subscriber exists
- Check tags and merge fields
Check Activity Log
In MailChimp:
- Go to Audience > All contacts
- Click on subscriber
- View Activity tab
- See subscription source
API Rate Limits
MailChimp limits:
- 10 concurrent connections
- No hard request limit (fair use)
- Batch operations for high volume
OneTap Login subscribes one at a time (per registration).
Error Messages
"API Key Invalid"
Cause: Wrong or expired API key.
Solution:
- Generate new API key
- Copy complete key including
-usXsuffix - Update in OneTap settings
"List Does Not Exist"
Cause: Wrong Audience ID.
Solution:
- Verify Audience ID in MailChimp settings
- Check for typos
- Ensure audience isn't archived
"Member Exists"
Cause: Email already in audience.
Solution: This is normal for returning users. OneTap skips existing subscribers.
"Compliance State"
Cause: Email is on compliance hold.
Solution: Check MailChimp compliance settings or contact MailChimp support.
MailChimp-Specific Features
Groups
To add subscribers to a specific group:
- Get group ID from MailChimp
- Configure in OneTap settings (if available)
- Or use MailChimp automation to assign
Automations
Trigger automations on subscription:
- In MailChimp, create automation
- Set trigger: "Someone subscribes"
- Filter by tags (e.g., "google-signup")
Segments
Create segment of Google users:
- Go to Audience > Segments
- Create segment
- Condition: Tags > is > google-signup
Integration Code
How OneTap Calls MailChimp
// Simplified example
$response = wp_remote_post(
"https://{$dc}.api.mailchimp.com/3.0/lists/{$list_id}/members",
[
'headers' => [
'Authorization' => 'Basic ' . base64_encode("user:{$api_key}")
],
'body' => json_encode([
'email_address' => $email,
'status' => 'pending', // or 'subscribed'
'merge_fields' => [
'FNAME' => $first_name,
'LNAME' => $last_name
],
'tags' => ['google-signup']
])
]
);
Troubleshooting
Connection Test Fails
- Verify API key format (includes
-usX) - Check API key hasn't been deleted
- Verify account is active
- Try generating new API key
Subscribers Not Appearing
- Check DOI: User may need to confirm
- Verify correct audience selected
- Check MailChimp cleaned/bounced list
- Review OneTap debug logs
Tags Not Applied
- Verify tag names in settings
- Check for special characters
- Tags are created if they don't exist
Best Practices
Do's
- Use double opt-in for GDPR compliance
- Tag Google signups for segmentation
- Set up welcome automation
- Monitor subscription rates
Don'ts
- Don't disable DOI for EU audiences
- Don't use API key in public code
- Don't ignore bounce/complaint rates
Next Steps
- Marketing Consent - GDPR consent UI
- Email Marketing Overview - Compare providers
- Welcome Email Editor - Custom emails