Question
How do I prevent duplicate leads in Marketo when using Segment?
Product
Twilio Segment
Environment
Segment Console
Answer
Marketo allows you to upsert leads based on any field. Segment uses email and userId, as well as anonymousId if you are tracking anonymous activity. email is used first since that is the field Marketo recommends is unique for your leads. However, many Track and Page calls don’t include an email address. In that case, Segment uses the userId or anonymousId passed in your Track and Page calls to associate these events to leads in Marketo.
You can do one of the following to prevent duplicate leads:
(Recommended) Upload a CSV adding your userId to all your leads in Marketo before enabling the destination.
After you create the userId field in Marketo, you can upload a list of all your users with an email column and a userId column. Your CSV should look like this:
| userId | |
|---|---|
| alex@email.com | ABC1234 |
| natasha@email.com | XYZ9876 |
To upload a list to Marketo, when you are in Lead Database:
- Click All Leads.
- Then click New, then Import List.
- Select your CSV, then click Next. Make sure
Email AddressanduserIdare the Marketo Fields selected then click Next. - Name your list or select a pre-existing list. Select None for Acquisition Program. Then click Import.
Manually merge leads in Marketo.
Follow Marketo’s instructions to merge any duplicate leads found in Marketo after enabling the destination.
- Make sure to call Identify first. This is already a recommended best practice as part of the Segment spec.
- Pass an email in your Track and Page calls.
Additional Information
You can find more details here.