Question
Is it possible to call getLead using the mkt_tok from a dynamic email?
I am using the SOAP API to look up users landing on resource pages on our site, and update their Marketo record when an interesting moment happens.
For most users, using the _mkto_trk cookie works, and I can look them up using the getLead API method with a key type of "COOKIE".
I can't find a way to efficiently look up users who land on our site from an email campaign, however. The user's cookie gets updated to match their lead record once the munchkin script runs on the page, however, that's too late to serve up personalized content on their first page view.
I've tried several ways to look up the user from the mkt_tok query string parameter, but I can't get a result back from the API. I've looked through the munchkin script to see how the cookie is derived from the URL component, but it isn't immediately obvious, especially since I only have the uglified script to read through.
How can this be done? I'd like to detect if the user is recognized in Marketo and pull their lead information before rendering the page, so waiting until the page renders and the munchkin script runs is not an ideal solution.
For most users, using the _mkto_trk cookie works, and I can look them up using the getLead API method with a key type of "COOKIE".
I can't find a way to efficiently look up users who land on our site from an email campaign, however. The user's cookie gets updated to match their lead record once the munchkin script runs on the page, however, that's too late to serve up personalized content on their first page view.
I've tried several ways to look up the user from the mkt_tok query string parameter, but I can't get a result back from the API. I've looked through the munchkin script to see how the cookie is derived from the URL component, but it isn't immediately obvious, especially since I only have the uglified script to read through.
How can this be done? I'd like to detect if the user is recognized in Marketo and pull their lead information before rendering the page, so waiting until the page renders and the munchkin script runs is not an ideal solution.