Re: Dynamic Content Link on a Marketo Landing Page

Ken_Ungaro
Level 2

Dynamic Content Link on a Marketo Landing Page

I have a global form being used across multiple URL's on our website's Resource Center pages(outside of Marketo). Upon form submission on each of these pages, the user is delivered to a Marketo based Thank You page and an email containing a link to the actual asset (whitepaper, case study, etc.) is sent to the submitter. Process works great. However, the issue has been raised by the marketing group that they want each unique asset delivered upon form submission rather than telling the guest to check their email for the asset. Is there a way to do this without 1) Having to create a unique form for every landing page or 2) Having to create a unique "Thank You" landing page for every asset or 3) Having to create a token for every asset(pdf, whitepaper, case study)?

What I am trying to achieve is serving a dynamic link or token that populates depending on the URL of the page the form resided on. Is this possible in Marketo?

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamic Content Link on a Marketo Landing Page

Yes, there are numerous examples of this if you search past Community posts.

You do have to be specific about what you mean by "depending on the URL". If the URL explicitly -- and already -- contains the link to the downloadable asset, or at least something that can be reliably transformed into the asset, then you can use this is to set the Thank You URL using the Forms API.


For example, if the URL hosting the form is

https://pages.example.com/downloader.html?some_specific.pdf

and all your files are in your Marketo design studio, then you can derive the downloadable's URL from the page's URL easily.

MktoForms2.whenReady(function(form){

form.onSuccess(function(values,tyURLFromFormEditor){

var tyURLFromCurrent = "https://pages.example.com/rs/111-XOR-222/images/" + document.location.search.substring(1);

document.location.href = tyURLFromCurrent;

return false;

});

});

If the URL is

https://pages.example.com/downloader.html?file=some_specific&type=pdf

then presumably that too could be used to assemble the downloadable's URL in a predictable fashion.

But when you get to

https://pages.example.com/downloader.html?utm_campaign=some_kinda_campaign

that's not going to be automatically translatable into anything. You'd need some kind of mapping table in JS. Or at that point creating an overrideable Program-level {{my.token}} is probably just as easy.

Arun_Sharma9
Level 4

Re: Dynamic Content Link on a Marketo Landing Page

If possible extend the website pages backend by creating a custom field to hold the link of the pdf you want to be available once some one filled the form.

Once you do that, you have to add the pdf link of all the assets by going to the pages in that custom field and then retrieving the custom field value when the page is open by any user. Then using the technique shared by Sanford, you can redirect the user to the final pdf on submission of the form.

Arun Sharma
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamic Content Link on a Marketo Landing Page

If possible extend the website pages backend by creating a custom field to hold the link of the pdf you want to be available once some one filled the form.

It's a Marketo Landing Page, per the subject line.

Arun_Sharma9
Level 4

Re: Dynamic Content Link on a Marketo Landing Page

"I have a global form being used across multiple URL's on our website's Resource Center pages(outside of Marketo)..."

I replied as per above

Arun Sharma
SanfordWhiteman
Level 10 - Community Moderator

Re: Dynamic Content Link on a Marketo Landing Page

Well, who knows what it really is.