Marketo landing page conversion metrics when using lead tokens | Community
Skip to main content
fwiseman
Level 2
January 24, 2020
Solved

Marketo landing page conversion metrics when using lead tokens

  • January 24, 2020
  • 2 replies
  • 4982 views

Hello - I have an issue and am hoping someone can shed some light on it. 

I ran a campaign last quarter using Marketo landing pages that passed lead tokens through to the next page (which was not a Marketo landing page).

The lead token passing worked great, except "conversions" for the Marketo landing page were not being tracked. The calls to action on these pages were set up in our template as hyperlinked button graphics.

To solve this, Marketo suggested changing the hyperlinked button graphic calls to action to 'button-only' Marketo forms. We updated our templates and conversions started appearing, but quickly realized the lead tokens were no longer passing through to the next page. 

Passing lead tokens is a campaign requirement as well as seeing landing page conversions for our a/b test.

Has anyone else encountered this? We've been working with our reps at Marketo and have paid for extra consulting hours but still don't have a solution. I'm hoping the community can help! 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Are you saying there is another way to pass lead tokens besides including them in the call to action URL? 

Of course. If they're included in the Thank You URL of a form they will also be passed to the next page.

You also probably don't realize it, but the button (really just a link that looks like a button) isn't correct because the token is not being properly URL-escaped.

I'm out for the night but will show you how it's done tomorrow. Trivial JS + HTML, this shouldn't pose a challenge to an experienced consultant.


Looks like nobody tested that Fastrack page in IE. It's a blank page in any version (through IE 11) because of incompatible JavaScript. That's gonna lose leads, as IE is not done (and may never be, depending on industry).

 

Anyway, here's how you have your "big button" form redirect to the Fastrack page with the mls_code query param attached.

 

Add this code just before the closing </body> tag on your Marketo LP:

 

 

<!-- encoding-safe export --> <datalist id="mktoExports"> <option label="mlsCode">{{lead.MLS Code (C)}}</option> </datalist> <!-- /encoding-safe export --> <!-- custom form behaviors --> <script> MktoForms2.whenReady(function(form){ form.onSuccess(function(submittedValues,tyURL){ var tyLoc = document.createElement("a"); tyLoc.href = "https://cloudagentsuite.com/fastrack/bundle/suite"; tyLoc.search += "?promo=fall2019tsl"; tyLoc.search += "&mls_code=" + encodeURIComponent(safeExports.mlsCode); document.location = tyLoc; return false; }); /* --- NO NEED TO TOUCH BELOW THIS LINE! --- */ var arrayify = getSelection.call.bind([].slice), exports = document.querySelectorAll("datalist#mktoExports option"); var safeExports = arrayify(exports) .reduce(function(acc,next){ acc[next.label] = next.value; return acc; },{}); }); </script> <!-- /custom form behaviors -->‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

 

 

The code already has the correct {{lead.token}} from your instance. If you need to change that, it's the text in the <option> element, as you can see.

 

It also already has the destination URL you provided.

 

You wouldn't ever modify anything below /* THIS LINE */ unless you understand the code completely.

2 replies

SanfordWhiteman
Level 10
January 24, 2020

Add the lead tokens to the Thank You URL. It couldn't be simpler. Of course you need to provide your page and the exact way you want the query string to appear, this can't be built by guessing what you want...

fwiseman
fwisemanAuthor
Level 2
January 24, 2020

Hi Sanford, thank you for the response. But what do you mean by "Add the lead tokens to the Thank You URL"?

This is the Marketo Landing Page we were A/B testing - http://info.cloudagentsuite.com/fall-promo-tsl.html 

The calls to action on those landing pages were - https://cloudagentsuite.com/fastrack/bundle/suite?mls_code={{lead.MLS Code (C):default=}}&promo=fall2019tsl 

(That page defaults to https://cloudagentsuite.com/pricing when no "mls_code" lead token is passed.)

But as 'hyperlinked button graphics' we got no conversion metrics in Marketo - when we switched to 'button-only forms' we lost the ability to pass lead tokens. Are you saying there is another way to pass lead tokens besides including them in the call to action URL? 

SanfordWhiteman
Level 10
January 25, 2020

Are you saying there is another way to pass lead tokens besides including them in the call to action URL? 

Of course. If they're included in the Thank You URL of a form they will also be passed to the next page.

You also probably don't realize it, but the button (really just a link that looks like a button) isn't correct because the token is not being properly URL-escaped.

I'm out for the night but will show you how it's done tomorrow. Trivial JS + HTML, this shouldn't pose a challenge to an experienced consultant.

SanfordWhiteman
Level 10
January 27, 2020

please check your thread for responses.

fwiseman
fwisemanAuthor
Level 2
January 27, 2020

Thank you! We will try that!