Setting up Marketo Lead Activity Data Stream with Adobe I/O Events
These instructions describe how to set up and get started using Adobe I/O Events for Marketo lead-based activities and change events.
Introduction
The Lead Activity Data Stream provides near real-time streaming of audit tracking Lead Activities where large volumes of Lead Activities can be sent to a customer’s external system. Streams enable customers to effectively audit Lead-related events, usage patterns, provide views into Lead changes and trigger processes and workflows based upon the different types of Lead Events.
data-src=marketo-data-streams-setting-up-ga-stream.md
Setup Adobe I/O
See Getting Started with Adobe I/O Events
For basic instructions for this use case, starting from console.adobe.io:
When prompted, click the designated button to proceed:
-
Select
Create new project
-
Select
Add event
-
Filter by
Experience Cloud -
Select
Marketo Lead Activity Data Stream
-
Subscribe to the lead-driven change events of your choosing
-
Set up OAuth Server-to-Server Credentials
-
Set up Event Registration
-
Provide a name and description for this event subscription
-
Optionally choose whether to enable Webhook or Runtime action
-
Enable Webhook
- We recommend batch over single webhooks
- For
Webhook URLa public https endpoint must be provided - The endpoint must be able to handle get and post requests
- The get request must respond with the challenge query if it exists
- The post request must respond that it received the message or the webhook will re-attempt to send several times before giving up and automatically disabling the webhook sends
-
Enable Runtime action
- See Setting up your Runtime Environment
- Select a pre-made runtime action/runtime namespace
-
-
-
After Saving
- Verify that the Status is
Active - If Webhook was selected, verify that it successfully passed the challenge without errors
- Verify that the Status is
data-src=marketo-data-streams-developer-guidelines.md
data-src=marketo-data-streams-multiple-instances.md
Event Data Structure
Events are structured in JSON format using the CloudEvents spec
Example Event (batch):
[
{
"eventid": "ec2c6092-1e94-45e9-b2dd-0b6bad0baa6f",
"specversion": "1.0",
"type": "com.adobe.platform.marketo.activity.standard.openemail",
"source": "urn:marketo_activity_stream",
"id": "a1764870-4f4b-4f8c-82d6-59b0fff2d39c",
"time": "2024-12-17T18:39:33Z",
"datacontenttype": "application/json",
"data": {
"munchkinId": "123-ABC-456",
"leadId": "1234",
"activityDate": "2024-12-17T18:39:33Z",
"activityTypeId": 10,
"activityType": "Open Email",
"activityLogItemId": 1234567890,
"primaryAttributeValueId": 1234,
"primaryAttributeValue": "Attribute Value",
"attributes": [
{
"name": "Campaign Run ID",
"dataType": "integer",
"value": 1234
},
{
"name": "Platform",
"dataType": "string",
"value": "Platform Name"
},
{
"name": "Device",
"dataType": "string",
"value": "Device Name"
},
{
"name": "Mailing ID",
"dataType": "object",
"value": 1234
},
{
"name": "User Agent",
"dataType": "string",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
},
{
"name": "Is Mobile Device",
"dataType": "boolean",
"value": false
}
]
},
"recipientclientid": "<your_client_id>"
},
{
"eventid": "97980214-3c8f-4964-88a3-75b42833a1f9",
"specversion": "1.0",
"type": "com.adobe.platform.marketo.activity.standard.visitwebpage",
"source": "urn:marketo_activity_stream",
"id": "a434d7ee-fe91-4b96-aaf2-61f1c6f4c46e",
"time": "2024-12-17T18:42:49Z",
"datacontenttype": "application/json",
"data": {
"munchkinId": "123-ABC-456",
"leadId": "1234",
"activityDate": "2024-12-17T18:42:49Z",
"activityTypeId": 1,
"activityType": "Visit Webpage",
"activityLogItemId": 1234567890,
"primaryAttributeValueId": 1234,
"primaryAttributeValue": "Attribute Value",
"attributes": [
{
"name": "Client IP Address",
"dataType": "string",
"value": "11.22.33.44"
},
{
"name": "Query Parameters",
"dataType": "string",
"value": ""
},
{
"name": "Referrer URL",
"dataType": "string",
"value": ""
},
{
"name": "User Agent",
"dataType": "string",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
},
{
"name": "Webpage ID",
"dataType": "object",
"value": 1234
},
{
"name": "Webpage URL",
"dataType": "string",
"value": "/lp/123-ABC-456/MyLandingPage.html"
}
]
},
"recipientclientid": "<your_client_id>"
}
]
Example Event (single):
{
"eventid": "4109a990-da28-4c5b-bad9-22df8903ed9a",
"specversion": "1.0",
"type": "com.adobe.platform.marketo.activity.standard.clicklink",
"source": "urn:marketo_activity_stream",
"id": "570b455e-203f-4983-91a8-5a03f597fda5",
"time": "2024-12-17T18:43:56Z",
"datacontenttype": "application/json",
"data": {
"munchkinId": "123-ABC-456",
"leadId": "1234",
"activityDate": "2024-12-17T18:43:56Z",
"activityTypeId": 3,
"activityType": "Click Link",
"activityLogItemId": 1234567890,
"primaryAttributeValueId": 1234,
"primaryAttributeValue": "Attribute Value",
"attributes": [
{
"name": "Link ID",
"dataType": "object",
"value": 1234
},
{
"name": "Client IP Address",
"dataType": "string",
"value": "11.22.33.44"
},
{
"name": "Query Parameters",
"dataType": "string",
"value": ""
},
{
"name": "Referrer URL",
"dataType": "string",
"value": "https://marketo.com/lp/123-ABC-456/MyLandingPage.html"
},
{
"name": "User Agent",
"dataType": "string",
"value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
},
{
"name": "Webpage ID",
"dataType": "object",
"value": 1234
}
]
},
"recipientclientid": "<your_client_id>"
}
Data Field Definitions
Many of the fields are common across the different types of events. The data object will contain the specific details of the event. In particular, the attributes array will contain a subset of all possible attributes (or none at all!) depending on the event type, and the event context.
The type field will always be the Event Type name, all lowercase with spaces removed, appended to the string "com.adobe.platform.marketo.activity.standard". For example, for the "Open Email" Event Type, the type string will be "com.adobe.platform.marketo.activity.standard.openemail".
All customer-defined activity types will be delivered with an identical event type "com.adobe.platform.marketo.activity.custom", with no suffix.
The data field contains the following data:
And finally, all Attribute objects in the attributes array will contain the following fields:
Some events may include additional metadata with their response. You are always able to emit a sample event for every event type from within the Adobe Developer Console to see an example of the event structure.
Event List
These are all of the currently supported Lead Activity Event Types. If you have a "firehose" endpoint configured that is subscribed to more than one event type, you can identify the type of event in three different ways.
Here are examples using the "Open Email" event type:
- Text match on the
activityTypefield under thedataobject (e.g.payload.data.activityType= "Open Email") - Number match on the
actitityTypeIdfield under thedataobject (e.g.payload.data.activityTypeId= 10) - Text match on the
typefield with the concatenated, lower-cased Event Type (e.g.payload.type= "com.adobe.platform.marketo.activity.standard.openemail")
data-src=marketo-data-streams-debug.md