Associating anonymous and known leads across different domains

Anonymous
Not applicable

Associating anonymous and known leads across different domains

Hi there,

We have a tricky issue linking our anonymous and known leads.

There are 2 domains that our website traffic travels between, the website and the online booking portal, and the Munchkin script have been implemented across both domains. Visitors come in through the website (Marketo capture information on what source they came from), and are then referred to the online booking portal to get a quote. When they are on the online portal, they have to enter in their email address through ha non-Marketo form to obtain a quote and they can even book in their job. This information is fed into our custom CRM and synced into Marketo in real time.

However, on our Marketo instance, it has been coming through as 2 separate leads. The visit to our website would have an anonymous lead created, tracking web page activity, how they got to the portal, how far they went onto getting a quote and booking in the job. The lead that’s synced into Marketo via the CRM containing the email address and quote information, comes in as a new lead, and won’t connect with the anonymous lead created. Therefore disabling us from associating webpage activity with booking activity, and calculating ROI.

Our developer have assisted us by adding a script so when the email address is submitted and synced into Marketo, it will now also send the cookie value in a new Marketo Cookie field (e.g. id:561-HYG-937&token:_mch-marketo.com-1258067434006-50277).

The anonymous and known leads are still not associating though. It feels like we’re missing a step because the Marketo Cookie field isn’t linked to anything in Marketo? Is there any solution to this issue...?

18 REPLIES 18
SanfordWhiteman
Level 10 - Community Moderator

Re: Associating anonymous and known leads across different domains

You have the ingredients of a solution to this common problem, but you aren't putting them together. Having the cookie value stored on the lead is critical, but you also need to run a webhook to associate the lead with its cookie. Right now, the cookie is just any old field and has no inherent meaning.

Anonymous
Not applicable

Re: Associating anonymous and known leads across different domains

Thanks Sanford for your reply. How do I run a webhook to connect these?

I have tried setting a webhook up as per another post, exactly as the post suggest (below is exactly what is in our instance, except munchkin id replaced), but it's still not associating. Should we adjust the payload template or encoding...?

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Associating anonymous and known leads across different domains

https://eva-test.salmat.com.au/ldn/csetOnline.do times out, then redirects, for me.  Is it configured to only accept connections from Marketo IPs? What's the underlying code run by that webhook?

Anonymous
Not applicable

Re: Associating anonymous and known leads across different domains

It is configured to accept Australian IPs I believe.

What do you mean underlying code run by the webhook? This is how it's set up currently:

pastedImage_0.png

SanfordWhiteman
Level 10 - Community Moderator

Re: Associating anonymous and known leads across different domains

I mean the underlying code run by cSetOnline.do.  From the extension .do I gather that's a Java webapp.  You're feeding it all required information in the webhook template, but I couldn't possibly know if it's calling Marketo correctly (looks like a server-side form post, not an API per se) unless I saw the Java code.  It looks a little strange to me that the munchkinId is enclosed in parens and single quotes, but it's perfectly possible that the Java code strips those off appropriately before reposting to Marketo.

You also don't need to bounce this particular request off an outside webhook server.  You can post directly to the /save endpoint: http://localhost/index.php/leadCapture/save. In that case you definitely do not want the munchkinId wrapped in anything, you want plain old munchkinId=AAA-BBB-CCC.

Anonymous
Not applicable

Re: Associating anonymous and known leads across different domains

Thank Sanford!

After editing the webhook, Marketo is now picking up web activity of the lead prior to filling out the form (on the online portal domain). Making the changes as per your suggestions did the trick:

http://localhost/index.php/leadCapture/save

Email={{lead.Email Address}}&munchkinId=aaa-bbb-ccc&formid=1006&_mkt_trk={{lead.Marketo Cookie ID}}

However, on the lead record, it's still missing activity from the website (previous domain) which is also tracked with the same Munchkin code.

Are we missing another piece of the puzzle?

SanfordWhiteman
Level 10 - Community Moderator

Re: Associating anonymous and known leads across different domains

If it's the same cookie on both domains, then you aren't missing anything.  If it isn't working, it can't be the same cookie.

You said your dev is supplying "the" cookie value along with the form.  How exactly is s/he transferring the cookie value from domain 1 to domain 2? Is s/he just supplying the the domain 2 cookie?  Obviously that alone won't work: when Munchkin doesn't see a cookie value either already in the browser or in its configuration options, it generates a new, random cookie. Since cookies are not automatically shared across domains, you have to use special code to make sure the existing cookie is in place before a new one is created. If the only way to get to domain 2 (at least the first time) is via domain 1, that's a good thing, because it means you can transfer the cookie easily.  If not, you need to put in more work.

(It's funny how Mark Wallace is asking essentially the same question right now. I guess that proves what I meant about "common"! But it might be more accurately described as "not without precedent." )

Anonymous
Not applicable

Re: Associating anonymous and known leads across different domains

Yes I believe they are sending through 2 separate leads as web activity on domain A remains with an anonymous lead and not linked with web activity on portal domain. In most of the cases the first time someone will go to portal domain is via domain A (unless they are opening a system non-Marketo quote email from a different device).

By "special code" do you mean this one? Associate Lead » Marketo Developers Should I ask the developer to add this to the portal domain or both...?

SanfordWhiteman
Level 10 - Community Moderator

Re: Associating anonymous and known leads across different domains

Yes I believe they are sending through 2 separate leads as web activity on domain A remains with an anonymous lead and not linked with web activity on portal domain. In most of the cases the first time someone will go to portal domain is via domain A (unless they are opening a system non-Marketo quote email from a different device).

Well, if you're willing to ignore those cases where someone goes straight to domain B and make the decision to only push cookies that originate on domain A to domain B, your developer's job will be far easier.  Let's call this Option 1.

It takes specialized skills to get this right if you're going to be pulling an existing cookie from domain A to domain B and/or pushing a cookie that originates on domain B to domain A. This is Option 2.  You need someone who is very savvy about the whole ecosystem including JS and Munchkin.

By "special code" do you mean this one? Associate Lead » Marketo Developers Should I ask the developer to add this to the portal domain or both...?

No, that REST method isn't going to help.  It'll amount to merely a less scalable form of the webhook you've already got and it should not be used from the browser.

To implement Option 1, as I alluded to in my earlier replies to Greg, you only need to make sure that all links that leave domain A for domain B are decorated in some way with the cookie value.  This can mean changing those links to actually be POSTs to domain B instead of GETs and passing the value in the request body (debatably the best method because the value doesn't appear in the URL at all, but it will require server work); or changing the links to pass the value in the query string or #hash, then reading and removing the value using JavaScript (this method doesn't require any changes to code on the portal server).