Skip navigation
All Places > Products > Blog > Author: John M

Products

4 Posts authored by: John M 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 timeframe. 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 500mb 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 timeframe

 

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_qmU5zeeZ0S0HeaNcr1g78VCSEcccrFSkSlu9HS6hO2777h6w3kbebSPr4NTpsqz6ZbQaKWmmRpQ22qoA&retURL=/partners/Menu/P_AU_WD2_Drive_Away?mkt_tok=eyJpIjoiT1RZNFpqQXlPVGN5TldRMiIsInQiOiJNQWZPN1dFUEJaVzl4WTg5SU1MeEJ1a2ptdHRTQjF1MHJqMk5Fd1BBWVl1dlBaRUxSRk1UNWNBVmhwNlNYTFJVZzNEUG9xYlgyK2Q3Q1RkdmZoblFwVlI3RU1yZ1FmQ3BKVm1vY08rWGY3TTVtZGZRb0tSM3E4T2xXemN5V20wbDVveVFcL1hmc0YrQjNXKzcwM1ZHNFZBPT0ifQ","User 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:\"InferredLanguage\";s:2:\"pt\";s:6:\"formid\";s:4:\"2399\";s:13:\"_mktoReferrer\";s:76:\"https://www.acme.com/br/pt/work/solutions/system/s1/power-and-grid-systems.jsp\";s:12:\"referringURL\";s:25:\"https://www.acme.com/br/pt/\";s:8:\"_mkt_trk\";s:52:\"id:178-XXX-668&token:_mch-acme.com-1572566332033-60671\";s:10:\"munchkinId\";s:11:\"178-XXX-668\";s:4:\"form\";s:4:\"2399\";}"}

 

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=eyJpIjoiTVRjellqRTROell5TVdFNSIsInQiOiJtMGxvdXBKS1ZcL29FZUF5UzZCY3Y2V2tHbmJxNjY1cndrelFWalFZSUdNT3M4Z095WnhIeFwvbXpJUWRrVkpBdVBZUHpJcHZSbjZDUVRCR2s0cjJCSDhua2RyXC9OZ1EzdnhJM01BMVJIVFUwZmNOcHVRWTVOUGtqajFyeStDNGJSaENXYWV2czlqZGpQVEpQR055eWxFYlE9PSJ9","User 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=eyJpIjoiTVRjellqRTROell5TVdFNSIsInQiOiJtMGxvdXBKS1ZcL29FZUF5UzZCY3Y2V2tHbmJxNjY1cndrelFWalFZSUdNT3M4Z095WnhIeFwvbXpJUWRrVkpBdVBZUHpJcHZSbjZDUVRCR2s0cjJCSDhua2RyXC9OZ1EzdnhJM01BMVJIVFUwZmNOcHVRWTVOUGtqajFyeStDNGJSaENXYWV2czlqZGpQVEpQR055eWxFYlE9PSJ9\";}"}

 

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.

When you decide to secure your marketo landing pages using SSL, the final step will be Marketo consulting "cutting over" the server so that all of the landing pages redirect to their SSL versions.

 

When that happens you need to worry about mixed content.

 

What is that? Good question. Mixed content is non secure content (HTTP) served within a secure page (HTTPS), and it comes in two types, "active" and "passive". Passive mixed content such as the following will generall still render (depending on browser and version, but will result (again depending on the browser) in a warning]

 

  • <img> src attribute
  • <audio> src attribute
  • <video> src attribute
  • <object> where the object performs http requests

 

Active mixed content will generally cause a larger problem with the page, such as the visual aspects not rendering (CSS)

  • <script> src attribue
  • <iFrame> src attribute
  • All uses of CSS where the CSS is a url
  • <object> (data attribute)

 

All mixed content should be addressed, but only the active content will actually break the pages.

 

The official definition of mixed content as defined by the W3C is here -->  Mixed Content

It's true. Here at Marketo we use Slack, and our Slackbot HATES server side post.. so much so that when you mention it, it chastises you. It's really pretty amusing.

 

Slackbot.png

Fine! Jeez.

 

 

Really though, Slackbot is completely right. Server side post has effectively been replaced by the following REST endpoint, which is great and scalable.

 

http://developers.marketo.com/rest-api/lead-database/leads/#push_lead_to_marketo

 

This, along with my other most recent blog, provide a good blueprint for associating leads in a non marketo form with only one REST call. No fewer than 3 customers have had this very question for me this week alone, so it seems like a hot topic.

A common question we see in consulting relates to how a customer can use a non Marketo form, but still associate that lead with a known lead in Marketo. With Marketo forms, of course, it's simple, you jhust submit the form. With Non Marketo forms, its a bit tricker, but still possible.

 

One reason you might do this is because you're submitting a login form, and obviously that doesnt really make sense as a Marketo Form. Not to worry!

 

First, lets talk about some confusing names of important items related to the Marketo Munchkin Cookie and this process

 

Item
What is it?
_mrk_trkThe name of the hidden form field (more on that in a moment)
_mkto_trkThe name of the Marketo Munchkin Tracking Cookie. The cookie contains the Munchkin ID of the instance along with a unique identifier for this lead (known or anonymous.

 

The details on the tracking cooke are shown below. I use a plugin called "Awesome Cookie Manager" to view cookies. You can see yours by going to any site that leverages munchin

skitch.png

Tracking Cookie

 

skitch-1.png.jpeg

Marketo Munchkin Cookie Value

 

Armed with this knowledge, we can look at the solution here. the process is straightforward and we're helped by Munchkin. When you create a form field called "_mkt_trk" within a non marketo form on a page where Munchkin code is running, Munchkin knows enough to populate the value of that form with the Munchkin Cooke value.

skitch-2.png.jpeg

Cool right?

 

So, what does that mean? That means that in the following really simple non marketo form, youll not only receive the regular form fields.. youll also have the lead's cookie ID as well... and with THAT, you can use REST from your back end process to associate the lead.

 

That brings us to the second step which is associating the lead. for this youll need the marketo ID and the cookie ID. you've now got the cookie ID, and getting the Marketo ID is a simple matter of getting it from Marketo.

 

You'll need to call the following two REST endpoints.

 

first you'll use GetMultipleLeadsByFilterType, passing in the Email address to get the Marketo ID (http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/getLeadsByFilterUsin… )

then, you'll use AssociateLead (http://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/associateLeadUsingPO… ), passing in that ID, and the cookie Id.

 

Alternatively, you can use a amazing new REST endpoint .... "push lead to marketo" which you can read about here!  http://developers.marketo.com/rest-api/lead-database/leads/#push_lead_to_marketo

Filter Blog

By date: By tag: