Summary
Redirecting visitors from a Thank You landing page into a Content Track is a great way to promote your content to interested prospects.
This article covers:
- How to redirect form fills to a Content Track
- How to set up this redirect if you are using a Universal/Global Form
Redirect Form Fills to a Content Track
- Create a landing page in Marketo and add the code below using the HTML element:
Note
This page will appear blank to visitors before they are quickly redirected into a Content Track. This page essentially acts as a bridge, so the visitor’s email address can pass from the submitted form into the PathFactory platform.
This allows PathFactory to immediately identify the visitor, and track their activity.PathFactory-Redirect.html
<script> var lbUrl = getUrlParameter("lb_redirect"); if (lbUrl) { var lbLink = document.createElement("a"); lbLink.href = lbUrl; document.location.href = lbUrl + (lbLink.search ? "&" : "?") + "lb_email={{lead.Email Address}}"; } function getUrlParameter(name) { name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]'); var regex = new RegExp('[\\?&]' + name + '=(.*)'); var results = regex.exec(location.search); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' ')); }; </script>
- In the Marketo forms settings select Follow Up With: External URL, and enter the following URL:
http://YourMarketoBaseURL/PathFactory-Redirect.html?lb_redirect=- Replace YourMarketoBaseURL with the URL of your Marketo instance
- The PathFactory-Redirect.html component is the landing page that you created in step 1
- Replace with the URL of the Content Track you want to send visitors to
Thank You Page configuration Note: You can use the URL of any Target Track, Recommend Track, Explore Page, or Route.Example of a Content Track
- Your External URL will now be in the following format:
http://YourMarketoBaseURL/PathFactory-Redirect.html?lb_redirect=http://YourCompany.pathfactory.com/c/ExampleContentName?x=ContentExperienceID
Redirect Form Fills when using a Universal Form
If you are using a Universal/Global Form in Marketo, you must ensure that you have created a field for PathFactory Content Track names.
- Field Name: Track Name
From the landing page, the track name will be passed as a hidden field.
On the Thank You page you can Add Choice, specify the track name you want to redirect to, and create a specific url for that value.
Click here for more information on these Marketo functions.