We’ve all been in this situation: You attend a trade show or networking event and exchange business cards with someone who might be interested in your product. You promptly enter that person’s details into your CRM and reach out to them, hopefully sending them links to valuable content on your website.
Meanwhile, the contact may be browsing your site and building up a lead score entirely on their own. The problem is, that person’s session in their browser is still being tracked as an anonymous session in Marketo. It isn’t until that user takes action (i.e. submit a form) to reveal their identity to their browsing session and convert them to a known lead in Marketo.
Even if the conference you attend has a "Lead Scanner", all you are doing is importing those leads into Marketo as if they were entered by hand. Your leads still may be building up browsing history anonymously, and even reaching MQL without you even knowing it!
But wait…if we already know who this lead is, why do we have to wait until they tell us their information again in order to track their browsing behavior and qualify the lead?
The Munchkin script in Marketo that you install on your website is actually tracking the user’s activity from the beginning. It’s just when the lead becomes “known” that Marketo will then associate that lead with their previous browsing activity.
The good news is, you can use that same API to force Marketo to associate a lead’s identity with their session, assuming you know that info. Here is the basics of the script:
Note: The hashed key is encoded with SHA1. To generate this, concatenate your Munchkin API Private Key (located in the Admin section in Marketo) with the lead's email address. Then encode it with SHA1 (the non-HMAC version). So if your secret key was ‘mysecretkey’ the string you would hash is ‘firstname.lastname@example.org’. Make sure it's in lowercase so it gets processed correctly.
Of course, we don’t want to stick this right into the page of our website, because that would make EVERY new lead have the same email address. With a little bit of finessing, we can use some simple URL queries to pass in dynamic information about the lead so that when the script runs, it will bind the users’s session in Marketo with their actual email address.
The first step is to create a method of grabbing URL queries and processing them into the script. So if your URL was:
You could take each of those values (userEmail, userFirst, & userLast) and insert them into the script. In CFML, you could do it like this:
In PHP you would do it like this:
You can also extend the script to include any additional values you want for your lead, assuming that field exists in Marketo. For example, you could easily add 'Company' to the script:
Now when you first insert that new contact in your CRM, you could generate an email to that lead like this:
Now, when John clicks that link (notice that our URL variables are in the HREF), Marketo will immediately associate his session with his email address, and all of the Lead Scoring, Interesting Moments, etc will be available for you to see.
If you're looking for an easy way to generate the custom URL's used in the examples above, we've built a handy tool to help. Click here to use the Lead URL Builder tool.
By using these methods, you can now create deeper integration between your Marketing Automation and Sales teams to gather more robust information about the people you meet outside of the digital world.