Activity Types, Attributes, and Exporting

John_M
Marketo Employee
Marketo Employee

Customers often ask about exporting Marketo Activity Data. This can be accomplished using the bulk activity API or the standard activity API.

 

Some things you might consider are...

  • Is this a one-time or a recurring activity export?
  • What activities do I need?
  • Marketo Activities Data Retention Policy
    • Lead Activity and Campaign Membership data will be stored for a rolling 25 months past the activity date, and certain high-volume activity data will be retained for a rolling period of 90 days past the activity date.
    • If there are activities in your instance older than the policy dates they may be available to export. There's no guarantee they will be available if you wait to start your export.

 

The bulk API is a good option when you want to get activities in a maximum 31-day time frame. This is a great approach for a recurring extract with a start_date and an end_date. Once the file is ready for download, you'll be able to download a CSV of the data with the activity jSON parsed into columns. This approach has the following limitations

  • By default, Marketo instances are limited to 500 mb of downloaded bulk data per day
    • This API limit can be increased. You should speak to your CSM if you're interested.
  • Bulk api downloads are limited to a window of 31 day time frame

 

The activity API is the better option for a wider window of activities "all activities in the past 12 months" for example. Up to 300 activities are returned per call, returned as jSON, along with a "has more records" flag and if appropriate, a "nextPageToken" to pass into a subsequent call This approach has the standard per- call limitations of the standard REST API, as follows

  • By default, Marketo instances are limited to 50,000 calls per day.
    • This API limit can be increased. You should speak to your CSM if you're interested.
  • You may have up to 10 concurrent calls
  • You may execute up to 100 calls in a rolling 20 second window

Activity Types don't change for the great majority of Marketo instances (the exception might be extremely old Marketo instances).

 

Here are a few examples of what extracted activity looks like:

 

Visit Web Page - Example 1

Attribute                           Example Value
marketoGUID                 3418151667
leadId                               130810022
activityDate                     2019-11-01T00:00:00Z
activityTypeId                 1
campaignId                     null
primaryAttributeValueId   10720672
primaryAttributeValue       www.acme-company.com/en/about-us/press/news/all-news.jsp
attributes                           

{"Client IP Address":"103.249.182.5","Query Parameters":"","Referrer URL":"https://www.acme-company.com/en/about-us/press/","User Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36","Webpage URL":"/en/about-us/press/news/all-news.jsp"}

 

 

Visit Web Page - Example 2

Attribute                           Example Value

marketoGUID                  3418179520
leadId                               130810022
activityDate                     2019-11-01T00:08:34Z
activityTypeId                 1
campaignId                     139182
primaryAttributeValueId    60651643
primaryAttributeValue       partner.acme-company.com/partners/Menu/P_AU_WD2_Drive_Away
attributes

{"Client IP Address":"203.39.1.50","Query Parameters":"mkt_tok=eyJpIjoiT1RZNFpqQXlPVGN5TldRMiIsInQiOiJNQWZPN1dFUEJaVzl4WTg5SU1MeEJ1a2ptdHRTQjF1MHJqMk5Fd1BBWVl1dlBaRUxSRk1UNWNBVmhwNlNYTFJVZzNEUG9xYlgyK2Q3Q1RkdmZoblFwVlI3RU1yZ1FmQ3BKVm1vY08rWGY3TTVtZGZRb0tSM3E4T2xXemN5V20wbDVveVFcL1hmc0YrQjNXKzcwM1ZHNFZBPT0ifQ==","Referrer URL":"https://partner.acme-partner.com/partners/secur/frontdoor.jsp?sid=00DA0000000abSm!ARsAQMQb.ZPj5.J_qm... Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36","Webpage URL":"/partners/Menu/P_AU_WD2_Drive_Away"}

 

 

Fill Out Form - Example 1

Attribute                            Example Value

marketoGUID                   3418150822
leadId                                 330682053
activityDate                       2019-11-01T00:00:16Z
activityTypeId                   2
campaignId                       null
primaryAttributeValueId      2399
primaryAttributeValue         Web - Email Footer Form
attributes

{"Client IP Address":"159.215.34.1","Query Parameters":"","Referrer URL":"https://www.acme.com/br/pt/work/solutions/system/s1/power-and-grid-systems.jsp","User Agent":"Apache-HttpClient/4.3.3 (java 1.5)","Webpage ID":19497957,"Form Fields":"a:23:{s:6:\"module\";s:11:\"leadCapture\";s:6:\"action\";s:4:\"save\";s:18:\"responsys-settings\";s:12:\"tcm:25-17355\";s:5:\"email\";s:25:\"jim_miller41514@gmail.com\";s:16:\"MW_CUSTOMER_TYPE\";s:11:\"Electrician\";s:20:\"g-recaptcha-response\";s:548:\"03AOLTBLTBm4ZxKR65f4d9wAehfQyyNqOg1wQffMpDpMTiVWpaCy2YrheUMK9QoBD5rEFadyCAoLGjKm6tmkakzZ6x6saN6s5wz6LzkMkeM5egSYdhIlD1wxuDTABO-AA2iai3VEXACMQcFVNTJjhCqVfWpW4UJLgi9OwNQJIu6v3Yy7QC0sCvn6El-raKjQH4YeBlrxqrlNsDoIGgG9f0VImxrGCT7umOMrj0hOfPopHNiy3YOaZaNd4KOAynA-9JuUtqfC-51fhd59wquJfJbgQE5gb-dU9dTA7YkLGjDdNjBjwsu1PKrxnXfcbNi3S1hwP3rxzciDryAF2lYbVYXmBk7zi_nSRzhCpZdleJuY6Vlxicqr7v4qDIF2sKlgwqixYTmEchffVQigIiooekMyvZy241GhUtNpQfUQScAzOevO6_iT8MJCesMLAbPcUHvpn53vP2VKXN8rtDS0JgAeNGObBzzog-7WkOG0S310b-al6CVkmSZ3I9XCJUlCELmoBuEhagpUTHOIPV7yvwTQgxCwJNvQZdpw\";s:12:\"reCaptcha_id\";s:13:\"tcm:25-371393\";s:5:\"Email\";s:25:\"jim_miller41514@gmail.com\";s:4:\"iama\";s:11:\"Electrician\";s:10:\"MiddleName\";s:0:\"\";s:12:\"Unsubscribed\";s:5:\"false\";s:7:\"keyCode\";s:5:\"z609v\";s:10:\"LeadSource\";s:7:\"Website\";s:15:\"SourceDetail__c\";s:10:\"www.acme.com\";s:16:\"EmailPostingDate\";s:0:\"\";s:17:\"InferredCountry\";s:2:\"BR\";s:18:\"Inferre...";}"}

 

 

Fill Out Form - Example 2

Attribute                            Example Value

marketoGUID                     3418826618
leadId                                 222819241
activityDate                        2019-11-01T06:53:40Z
activityTypeId                     2
campaignId                        91108
primaryAttributeValueId     5993
primaryAttributeValue        Enriched Profile Form - Global EN
attributes

{"Client IP Address":"41.202.207.139","Query Parameters":"mkt_tok=eyJpIjoiTVRjellqRTROell5TVdFNSIsInQiOiJtMGxvdXBKS1ZcL29FZUF5UzZCY3Y2V2tHbmJxNjY1cndrelFWalFZSUdNT3M4Z095WnhIeFwvbXpJUWRrVkpBdVBZUHpJcHZSbjZDUVRCR2s0cjJCSDhua2RyXC9OZ1EzdnhJM01BMVJIVFUwZmNOcHVRWTVOUGtqajFyeStDNGJSaENXYWV2czlqZGpQVEpQR055eWxFYlE9PSJ9","Referrer URL":"https://go.acme.com/WW_201903_Welcome-Program_01-Profile-Completion-EP-LP.html?mkt_tok=eyJpIjoiTVRje... Agent":"Mozilla/5.0 (Linux; Android 8.1.0; TECNO F1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36","Webpage ID":50400813,"Form Fields":"a:30:{s:6:\"module\";s:11:\"leadCapture\";s:6:\"action\";s:5:\"save2\";s:9:\"FirstName\";s:12:\"Jean Paul\";s:8:\"LastName\";s:5:\"Mills\";s:7:\"Company\";s:11:\"Adobe\";s:4:\"iama\";s:19:\"Home Owner/Consumer\";s:5:\"Title\";s:6:\"Owners\";s:11:\"jobFunction\";s:11:\"Electrician\";s:7:\"Country\";s:2:\"CM\";s:10:\"LeadSource\";s:0:\"\";s:15:\"SourceDetail__c\";s:0:\"\";s:7:\"keyCode\";s:0:\"\";s:11:\"utmCampaign\";s:0:\"\";s:9:\"utmSource\";s:0:\"\";s:7:\"utmTerm\";s:0:\"\";s:6:\"gamify\";s:4:\"null\";s:18:\"InferredLanguage\";s:2:\"fr\";s:6:\"formid\";s:4:\"5993\";s:4:\"lpId\";s:6:\"469030\";s:5:\"subId\";s:2:\"52\";s:10:\"munchkinId\";s:11:\"178-XXX-668\";s:5:\"lpurl\";s:113:\"//go.acme.com/WW_201903_Welcome-Program_01-Profile-Completion-EP-LP.html?cr={creative}&kw={keyword}\";s:12:\"followupLpId\";s:6:\"469032\";s:2:\"cr\";s:0:\"\";s:2:\"kw\";s:0:\"\";s:1:\"q\";s:0:\"\";s:8:\"_mkt_trk\";s:68:\"id:178-XXX-668&token:_mch-acme.com-1572591226393-82542\";s:7:\"formVid\";s:4:\"5993\";s:7:\"mkt_tok\";s:248:\"eyJpIjoiTVRjellqRTROell5TVdFNSIsInQiOiJtMGxvdXBKS1ZcL29FZUF5UzZCY3Y2V2tHbmJxNjY1cndrelFWalFZSUdNT3M4Z095WnhIeFwvbXpJUWRrVkpBdVBZUHpJcHZSbjZDUVRCR2s0cjJCSDhua2RyXC9OZ1EzdnhJM01BMVJIVFUwZmNOcHVRWTVOUGtqajFyeStDNGJSaENXYWV2czlqZGpQVEpQR055eWxFYlE9PSJ9\";s:13:\"_mktoReferrer\";s:349:\"https://go.acme.com/WW_201903_Welcome-Program_01-Profile-Completion-EP-LP.html?mkt_tok=eyJpIjoiTVRje...";}"}

 

 

Click Email - Example 

Attribute                            Example Value

marketoGUID                   3418156845
leadId                                 254847408
activityDate                      2019-11-01T00:00:30Z
activityTypeId                  11
campaignId                      106171
primaryAttributeValueId     156271
primaryAttributeValue       EG_201904_EDM-to-all-our-Database-Public-Services-correct.01-EDM to all our Database Email
attributes

{"Choice Number":"0","Campaign Run ID":"313553","Platform":"Android","Device":"Android","Step ID":"237885","User Agent":"Mozilla/5.0 (Linux; U; Android 9; ar-eg; Redmi Note 8 Build/PKQ1.190616.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/71.0.3578.141 Mobile Safari/537.36 XiaoMi/MiuiBrowser/11.1.7-g","Is Mobile Device":true,"Link":"https://www.acme.com/eg/en/work/campaign/energy-challenge.jsp"}

 

 

I've created a list of those types, here Activity Type Attributes - Common - Google Sheets which you're welcome to download and use. The first tab shows the different Activity Types and the second tab shows common attributes for all activities. The sheet also shows many different activity examples. In these examples the JSON has been parsed out. 

 

   Note: Please note the attribute value for the fills out form activity can be confusing. 

 

Activity Type Attributes are also shown to illustrate the fact that different activity types have different attributes.

 

Marketo Professional Services is happy to do this with or for you you, and for details you should reach out to your PS Engagement Manager who can help scope the effort.

8654
1
1 Comment