Re: Segmentation: Use dynamic content on on marketo landing pages

Anonymous
Not applicable

Segmentation: Use dynamic content on on marketo landing pages

Hi is it possible to use dynamic content on non-marketo landing pages

We have a few campaigns we want to further personalized for when users:

1. Get an email

2. When they click on link, it will go to a landing page (non-marketo) we want to populate a few fields like
1. lead first name
2. lead owner contact info

5 REPLIES 5
Devraj_Grewal
Level 10 - Champion Alumni

Re: Segmentation: Use dynamic content on on marketo landing pages

SanfordWhiteman
Level 10 - Community Moderator

Re: Segmentation: Use dynamic content on on marketo landing pages

That's really simple stuff.  I'd put the values in the URL, Base64-encoded so they look random to the untrained eye.

You could bounce them off a Marketo-hosted redirector LP (which they wouldn't see) to fetch the data, or precompute the Base64 values and store 'em in lead fields.

Anonymous
Not applicable

Re: Segmentation: Use dynamic content on on marketo landing pages

how do I set this up with Marketo? thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: Segmentation: Use dynamic content on on marketo landing pages

Our goal is to pass a simple object like this in the URL:

     {"LeadEmail":{{Lead.Email Address}},"OwnerEmail":{{lead.Lead Owner Email Address}}

for example

     {"LeadEmail":"sandy@teknkl.com","OwnerEmail":"salesperson@example.com"}

while being as subtle as possible.

The way to keep it subtle is by Base64-encoding the data (which also, coincidentally, makes it safe to put in a URL hash without any other encoding). This will look like a random alphanumeric string to the vast majority of people (and even w/those that realize it contains a string, it's extremely unlikely that they would care, especially since you're outputting the info anyway!).

Base64-encoded, the above looks like this:

     eyJMZWFkRW1haWwiOiJzYW5keUB0ZWtua2wuY29tIiwiT3duZXJFbWFpbCI6InNhbGVzcGVyc29uQGV4YW1wbGUuY29tIn0=

Store that Base64 version in a token and it's very simple to add that in the #hash of your links (if you're not using the hash for anything else, that's a very easy place to parse out without touching the query string*):

     http://​example.com/landingpage.html?utm_campaign=whatever#{{Lead.LeadInfoEncoded}}

For the example lead above, that would be output as:

     http://​example.com/landingpage.html?utm_campaign=whatever#eyJMZWFkRW1haWwiOiJzYW5keUB0ZWtua2wuY29tI...

And once it's in the hash, in the HEAD of the destination LP just go like this:

     <script>

       var leadInfo = {};

       try {

         leadInfo = JSON.parse( atob( document.location.hash.substring(1) ) );

       } catch (e) {}

   </script>

Now you've got a leadInfo JS object you can read to put data anywhere you want on the page.

So the challenge isn't really on the LP (reading) end, it's on the link generating (writing) end -- how to get the Base64-encoded value I'm calling {{lead.LeadInfoEncoded}} above.

In theory, you have 3 choices here:

  1. Use Velocity.
  2. Use FlowBoost or the like.
  3. Export to Excel or another spreadsheet app and reupload.

Unfortunately, while [1] is possible if you used your own Velocity install, in Marketo's Velocity context it isn't feasible.

[2] is easy with FB because a convenience method is available for exactly this reason (Base64 encoding being something we do a lot):

     return FBEncode.base64Encode({

          LeadEmail: {{Lead.Email Address}},

          OwnerEmail: {{lead.Lead Owner Email Address}}

     });

[3] is not that hard, either.  Excel doesn't support Base64 on its own but you can download a few different macros since others have found the need over the years.  I have attached a working Excel spreadsheet with the functions already added.

* Obviously for a more robust solution you would use a known key-value pair instead of expecting to use the entire hash.

** H/t this guy for the spreadsheet it's based on.

SanfordWhiteman
Level 10 - Community Moderator

Re: Segmentation: Use dynamic content on on marketo landing pages

Unfortunately, while [1] is possible if you used your own Velocity install, in Marketo's Velocity context it isn't feasible.

Actually I sort of take this back, after working for a few hours on it. But I will save that trick for my blog.