SOLVED

Marketo REST API to get all cookie ids with associated activities

Go to solution
Babu_Chikati
Level 3

Marketo REST API to get all cookie ids with associated activities

Hi,

We are looking to get _mkto_trk( Munchkin cookie) and all associated user activities which might be associated to a lead or anonymous on the web page. Is there a  Marketo REST API which will get us the information we are looking for.

 

Thanks for quick help

Babu

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Marketo REST API to get all cookie ids with associated activities

You can query the associated known lead using the Munchkin cookie as a filter value in the GET leads endpoint, and use the obtained leadid to query the visited web page activity using the activities endpoint. Also, I don't think you could query data using API for the unassociated Munchkin sessions, you could look at the anonymous webpage activity report to review/monitor the anonymous visitors though. Furthermore, I don't think you can query for all the cookies and then query all the respective associated activities in one swoop, you gotta get the lead-id of the munchkin cookie-associated lead, and then get the activities using API. Also, what's your starting point? Do you have Munchkin Ids or lead ids of people? If you have got the latter, you could directly query the activities using API instead of bringing Munchkin into the picture.

 

 

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo REST API to get all cookie ids with associated activities

Seems like you're asking a few different questions.

 

First, there's not just one Munchkin cookie value per lead record. There are unlimited cookie values (the field is cookies), since different browser sessions and devices have their own randomly assigned cookie.

 

Second, you can't access anonymous web activities using the REST API. Marketo tracks all web activities, but it's not designed to have you use those activities while they're still anonymous. Web activities will be associated with a lead when possible, at which point you can access them using the Bulk Activity Extract (single CSV) or Bulk Activity Export (paginated JSON) endpoints.

 

Because all API-retrievable activities are by definition associated with a lead, there shouldn't be any need for you to know the cookie values.

View solution in original post

6 REPLIES 6
Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Marketo REST API to get all cookie ids with associated activities

You can query the associated known lead using the Munchkin cookie as a filter value in the GET leads endpoint, and use the obtained leadid to query the visited web page activity using the activities endpoint. Also, I don't think you could query data using API for the unassociated Munchkin sessions, you could look at the anonymous webpage activity report to review/monitor the anonymous visitors though. Furthermore, I don't think you can query for all the cookies and then query all the respective associated activities in one swoop, you gotta get the lead-id of the munchkin cookie-associated lead, and then get the activities using API. Also, what's your starting point? Do you have Munchkin Ids or lead ids of people? If you have got the latter, you could directly query the activities using API instead of bringing Munchkin into the picture.

 

 

Babu_Chikati
Level 3

Re: Marketo REST API to get all cookie ids with associated activities

 Thanks Darshil!!

We will have leadIds handy. Knowing that we can not get anonymous web activities via API we would prefer to configure a report and monitor. Thanks for quick reply, will post here once we complete our approach. 

Darshil_Shah1
Level 10 - Community Advisor + Adobe Champion

Re: Marketo REST API to get all cookie ids with associated activities

Cool and you're very welcome, @Babu_Chikati! Also, I second Sandy’s suggestion about using your general purpose tracking platform over Marketo’s (limited) capabilities on tracking Anonymous webpage visitors. You could of course view the anonymous webpage visitor data in the webpage activity report, but that's not an alternative to the GP analytics platform deployed on your site collecting web analytics data. Marketo analytics/reporting capabilities (GUI and API) are more suited for web sessions that are associated with  the known leads. Worth mentioning that Marketo associates the anonymous lead activity associated with the Munchkin cookie to the known record post the known lead-cookie association. Hope you find this helpful.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo REST API to get all cookie ids with associated activities

Seems like you're asking a few different questions.

 

First, there's not just one Munchkin cookie value per lead record. There are unlimited cookie values (the field is cookies), since different browser sessions and devices have their own randomly assigned cookie.

 

Second, you can't access anonymous web activities using the REST API. Marketo tracks all web activities, but it's not designed to have you use those activities while they're still anonymous. Web activities will be associated with a lead when possible, at which point you can access them using the Bulk Activity Extract (single CSV) or Bulk Activity Export (paginated JSON) endpoints.

 

Because all API-retrievable activities are by definition associated with a lead, there shouldn't be any need for you to know the cookie values.

Babu_Chikati
Level 3

Re: Marketo REST API to get all cookie ids with associated activities

Thanks Stanford!!

Understood that we can't get anonymous we activities via API. We want to visualize the most attracted web activities though it is anonymous, but we will create a report to check anonymous web activities. Thanks for the quick reply, will post the implementation approach here.

SanfordWhiteman
Level 10 - Community Moderator

Re: Marketo REST API to get all cookie ids with associated activities

I wouldn't advise trying to work with anonymous activities (while they're still anonymous) using any Marketo features. Not really what the platform is for. Use your general-purpose web analytics package (Clicky, GA, Matomo) for that.