Marketo is a leading marketing automation platform that enables you to identify the right audiences through effective behavioral tracking and deliver automated, personalized marketing campaigns.

RudderStack supports Marketo as a destination where you can seamlessly send your event data.

Find the open source transformer code for this destination in the GitHub repository.

Getting started

Before setting up the Marketo destination in RudderStack, you must create two fields in Marketo with the API names exactly as userId and anonymousId. RudderStack looks up the Marketo Lead objects using these properties. Without these two fields, all the events will fail.

Before configuring Marketo as a destination in RudderStack, verify if the source platform is supported by Marketo by referring to the table below:

Connection ModeWebMobileServer
Device mode---
Cloud modeSupportedSupportedSupported
To learn more about the difference between cloud mode and device mode in RudderStack, refer to the RudderStack Connection Modes guide.

Once you have confirmed that the source platform supports sending events to HubSpot, follow these steps:

  1. From your RudderStack dashboard, add the source. Then, from the list of destinations, select Marketo.
  2. Assign a name to the destination and click Continue.

Connection settings

To successfully configure Marketo as a destination in RudderStack, you need to configure the following settings:

  • Munchkin Account ID: Enter your Munchkin account ID.
You can find the Munchkin Account ID by logging into your Marketo instance and going to Admin > Integration > Munchkin. Your Munchkin ID is listed on the main screen in the Tracking Code section. For more information, refer to the Marketo documentation.
  • Client ID: Enter your Marketo client ID.
  • Client Secret: Enter your Marketo client secret next.
You can find the client ID and client secret by logging into your Marketo instance and going to Admin > Integration > LaunchPoint. Select the API service and click View Details to get the credentials. For more information, refer to the FAQ section below.

Custom Activity Settings

  • Track anonymous events: Enable this setting to track events that don't contain a userId.
If this setting is disabled, events that don't contain the userId field will automatically fail.
  • Create lead if it does not exist: If enabled, RudderStack will create a new Marketo lead if the user is not present.

The following settings are associated with the track events and require you to first create a Custom Activity in Marketo before sending an event. You also need to approve the activity in order to get the Custom Activity ID.

marketo connection settings 4
  • Map events to Marketo Activity ID: Use this setting to map the event name in track call to Marketo's custom activity ID. For example, you can map a Product Clicked event to a custom activity with the ID 100001 and name Product wishlisted.
  • Map your event properties to Marketo custom activity's field: Use this setting to map your track event properties to the Marketo fields listed in your custom activity. For example, you can map Product Clicked event's product_name property to the Marketo's productName field in the Product wishlisted custom activity.
  • Map event name to Marketo primary key: Map the track event name to the Marketo primary key associated with the custom activity. For example, you can map the Product Clicked event to Marketo's product_id primary field in the Product wishlisted custom activity. The primary field for Marketo's custom activity is marked with an asterisk (*).

Lead Mapping

  • Map your traits to Marketo custom fields: RudderStack maps some of the user traits to the custom Marketo fields by default (listed in the Supported mappings section). You can use this setting to override the default mappings or map any other traits to the custom Marketo fields. For custom Marketo fields, you can use the list of standard Marketo fields (REST API Name column) or any other custom field names existing in your lead records.

Identify

You can use the identify call to create or update a Lead object in Marketo.

A sample identify call is as shown:

rudderanalytics.identify("1hKOmRA4GRlm", {
name: "Alex Keener",
first_name: "Alex",
last_name: "Keener",
email: "alex@example.com",
})

Supported mappings

By default, RudderStack maps the following traits to the Marketo fields:

RudderStack traitMarketo field
address.citycity
company.namecompany
address.countrycountry
emailemail
firstNamefirstName
company.industryindustry
lastNamelastName
leadSourceleadSource
company.employee_countnumberOfEmployees
phonephone
address.zippostalCode
ratingrating
address.statestate
address.streetaddress
titletitle
birthdaydateOfBirth
websitewebsite
For the rest of the fields that you want to sync with Marketo, you can create a mapping of your traits and custom Marketo fields in the RudderStack dashboard, as specified in the Lead Mapping settings section.

Track

You can use the track events to register custom activities in Marketo.

Make sure to create the custom activities in Marketo before sending the events. Also, approve the activity in Marketo to get the Custom Activity ID.

A sample track call is as shown in the snippet below:

rudderanalytics.track("Order Completed", {
checkout_id: "C324532",
order_id: "T1230",
value: 15.98,
revenue: 16.98,
shipping: 3.0,
coupon: "FY21",
currency: "INR",
})
Refer to the Custom Activity Settings section for more information on mapping the track events.

FAQ

Why are my requests failing with the message "Lookup failed"?

Make sure you have created two fields in Marketo with the names userId and anonymousId, so that RudderStack can look up the Marketo lead database for leadId with the userId that are passed along with the event.

Why are my track events failing?

  • Make sure you have created two fields in Marketo with the API names exactly as userId and anonymousId. RudderStack looks up the Marketo lead objects using these properties. Without these two fields, all the events will fail.
  • If you're sending track events without userId, make sure you have enabled the Track Anonymous events setting in the RudderStack dashboard. If this setting is disabled, events that don't contain the userId field will fail.

How do I obtain the Marketo client ID and secret?

To set up the Marketo API service and obtain the client ID and secret associated with it, follow these steps:

  1. Log into your Marketo instance and click the Admin tab.
  2. Select LaunchPoint.
marketo launchpoint
  1. Here, you will able to see all the installed services used for connecting to Marketo.
marketo services
  1. To create a new service, click New > New Service.
  2. Enter the Display Name. From the Service dropdown, select Custom.
  3. Under Settings, enter the Description and select the API Only User, as shown. Finally, click CREATE.
marketo services
Make sure the API Only User associated with the API service has the necessary permissions to create or update contacts as wellas the custom activities.

Once the setup is complete, you should have the client ID and client secret for the API service. Use this to configure the Marketo destination in RudderStack.

marketo service details

How do I create a custom activity in Marketo?

For a step-by-step guide on creating a custom activity in Marketo, refer to this Marketo documentation.


Contact us

For more information on the topics covered on this page, email us or start a conversation in our Slack community.