How to get the token posted to the Landing Page? | Community
Skip to main content
November 27, 2018
Solved

How to get the token posted to the Landing Page?

  • November 27, 2018
  • 1 reply
  • 5771 views

Hi,

I am new to Marketo. I have a landing page and I want to use it to listing in a marketplace.

In Market Place is when the customer/subscriber clicks on the listing (Landing page URL ), it posts a token ( using x-www-form-urlencoded) to the mentioned landing page.

Is it possible to get the value of the token into a hidden field in landing page?

Thanks,

Beniton

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

It seems you're misinterpreting the purpose of this token. It's not enough for it alone to be posted to Marketo, it needs to be associated with the Marketo Munchkin cookie for the current browser session on your site. (And it also needs to be immediately exchanged for the permanent customer identifier and product code, which need to be stored back to the same lead, but if you could connect it with the correct lead, that exchange can be accomplished via webhook.)

It would be simple to have the Marketplace page POST the token to the Marketo /save endpoint. But that alone wouldn't get you anywhere, because it would create a new lead in Marketo with only that one field filled in (not an Email Address or any other info). It also wouldn't have anywhere to redirect from there, because Marketplace is POSTing only one field and /save requires a redirect URL as an additional query param (retURL).

In order for this interaction to work, you'll need an intermediate gateway. It'll be very lightweight, but is necessary to tie the pieces together. It will process the Marketplace token together with the session's first-party cookies. With that information it can exchange the token, associate the lead, and redirect to the next user-facing page.

1 reply

SanfordWhiteman
New Participant
November 27, 2018

Your question is a bit jumbled (sorry).

Are you trying to post a non-Marketo HTML form, hosted on a Marketo LP, to a remote endpoint?

Please explain the data flow in more detail.

Is it possible to get the value of the token into a hidden field in landing page?

The value of a Marketo {{lead.token}} or {{my.token}}? Of course, just output the token directly into the value of an <input type="hidden">.

November 28, 2018

Hi Sanford,

    We are trying to list a product in AWS market place. To list a

product in AWS market place we need to submit a SaaS URL to AWS for

product listing.

We are planning to submit one of our landing page URL to AWS as a SaaS

URL.  But as per AWS the product subscription happen in like below.

1. Customer finds the product listing in AWS market place.

2. Subscribes to the product clicking on subscribe button in AWS market

place.

3. AWS market place generates a token and POST it to our SaaS url (

which in our case is a marketo landing page )

4. So now my question is it possible to populate this token in a hidden

field?

5. I think if  the LP is called with query parameter it is possible to

store it to the hidden filed in LP (GET call), but I am not sure how

POST calls are handled with respect to marketo

Sorry for long email, Thank you for your response.

From AWS docs

https://docs.aws.amazon.com/marketplace/latest/userguide/configuring-your-saas-application-to-accept-new-customers.html

/The customer’s browser sends a POST request to your SaaS registration

URL. The request contains one POST parameter, x-amzn-marketplace-token,

containing the customer’s registration token/

Thanks,

Beniton

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 28, 2018

It seems you're misinterpreting the purpose of this token. It's not enough for it alone to be posted to Marketo, it needs to be associated with the Marketo Munchkin cookie for the current browser session on your site. (And it also needs to be immediately exchanged for the permanent customer identifier and product code, which need to be stored back to the same lead, but if you could connect it with the correct lead, that exchange can be accomplished via webhook.)

It would be simple to have the Marketplace page POST the token to the Marketo /save endpoint. But that alone wouldn't get you anywhere, because it would create a new lead in Marketo with only that one field filled in (not an Email Address or any other info). It also wouldn't have anywhere to redirect from there, because Marketplace is POSTing only one field and /save requires a redirect URL as an additional query param (retURL).

In order for this interaction to work, you'll need an intermediate gateway. It'll be very lightweight, but is necessary to tie the pieces together. It will process the Marketplace token together with the session's first-party cookies. With that information it can exchange the token, associate the lead, and redirect to the next user-facing page.