SOLVED

Re: Help please - landing page not triggering in smart list

Go to solution
Anonymous
Not applicable

Hi There,

Im at the pointy end of a project that is due soon and something is amiss so any help is appreciated.

Here is what I am trying to achieve.

1. Customer receives email to complete a survey on survey monkey

2. After completion they are redirected to a landing page

3. There is a smart campaign listening for this to occur

pastedImage_0.png

pastedImage_1.png

4. Program status changed to > completed survey

I have been trying unsuccessfully for a day to sort this.

Thanks

Matt

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

You already had the redirection code (in the onSuccess).  You seem to be cutting and pasting from different sources.

The full code to auto-submit and redirect is:

<script src="//app-sj01.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_1057"></form>

<script>

MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function(form) {

    //Add an onSuccess handler

    form.onSuccess(function(values, followUpUrl) {

        // Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl

        location.href = "https://www.surveymonkey.com/r/5KQ3VGB";

        // Return false to prevent the submission handler continuing with its own processing

        return false;

    });

  form.submit();

});

</script>

You will need the Munchkin JS and Muchkin.init() as well.  But, as I've noted, your resulting code will have a race condition.  It will not satisfy your requirements reliably. I would not use it on a production site.

View solution in original post

83 REPLIES 83
Anonymous
Not applicable

I tried both, created a LP prior to survey and didn't seem to work. I really need to get this figured

Grégoire_Miche2
Level 10

Are you using a browser with DTN activated ?

-Greg

Anonymous
Not applicable

I tried chrome again with the double landing page and it worked.

pastedImage_0.png

I didnt know what you meant by DTN, a google was bringing up results relating to java scripts. I remembered that firefox has this disabled. If this is true does this mean that leads using firefox may not be tracked and therefore programs wont work? Edge also failed, it seems chrome is the only browser that works.

Im going to retest this in the morning at work. I really appreciate you assistance.

Matt

Anonymous
Not applicable

It seems the only way to get the program firing is as Gregoire suggested is to create a landing page before the survey and one after. When testing in incognito mode all appears to be working.

SanfordWhiteman
Level 10 - Community Moderator

Yes, this makes total sense.

Once you reflect off the Survey Monkey page, you might as well be making a direct, unassociated hit on your LP.  It would be spooky if Marketo could identify the lead under those circumstances!

However, depending on Survey Monkey's capabilities, it isn't necessary to have an initial LP.  If Survey Monkey allows it, append the original mkt_tok to the the destination LP. If that is not possible, have SM pass the mkt_tok or email address as form fields.

Anonymous
Not applicable

Hi Sanford,

Thanks for the additional clarification.

So I can further my understanding, you mentioned that

'depending on Survey Monkey's capabilities, it isn't necessary to have an initial LP.  If Survey Monkey allows it, append the original mkt_tok to the the destination LP. If that is not possible, have SM pass the mkt_tok or email address as form fields.'

Can you elaborate a little on this. How can I append the original mkt_tok to the destination LP, im guessing this is within the email?

Or, SM pass the mky_tok or email address, im not sure what this means.

Thanks

Matt

SanfordWhiteman
Level 10 - Community Moderator

'depending on Survey Monkey's capabilities, it isn't necessary to have an initial LP.  If Survey Monkey allows it, append the original mkt_tok to the the destination LP. If that is not possible, have SM pass the mkt_tok or email address as form fields.'

Can you elaborate a little on this. How can I append the original mkt_tok to the destination LP, im guessing this is within the email?

When you embed a link to Survey Monkey in an email, Marketo rewrites it to bounce off the click tracking server.  The click tracking server appends a special query param mkt_tok that allows the final destination web page (provided it's running Munchkin) to associate web activities with the lead that received the email.

In your case, SM is getting the mkt_tok but it doesn't have any use for it, so it's being discarded.  If you could instead reappend it to the URL that SM sends the lead to after filling out the survey (i.e. the URL that's back under your control) then you can associate the lead as if they'd gone straight to you.

Grégoire_Miche2
Level 10

Hi Sanford,

From what I remember, SM cannot keep the query parameter and carry it over until the end of the survey. Which is why I made the assumption that a Marketo LP was necessary before SM. But this is worth a try as I have not used SM for a few months and it may have changed

An alternative solution would be a hidden, auto-submit form on the LP before SM that would fire as soon as it's loaded and use SM as a follow-up page. It would save a click.

-Greg

Anonymous
Not applicable

Hi Greg,

If you can direct me on how to set-up an hidden auto submit form that would be an amazing help and all my problems solved, for today anyway

Thanks

Matt

SanfordWhiteman
Level 10 - Community Moderator

Why do you need to submit a form?  That makes no sense.

The lead will be associated based on the Munchkin + mkt_tok alone.   This is true whenever you follow an email link.

All you need to do is to be sure that Munchkin has logged the visitWebPage event, which you can do by synchronously downloading the tracking pixel before redirecting.

Grégoire_Miche2
Level 10

HI Sanford,

The idea of auto-submitting a form was just to have the first LP appear, associate the lead and disappear automatically then moving to SM without a click from the lead.

But may be there is a faster and easier idea.

-Greg

SanfordWhiteman
Level 10 - Community Moderator

A lead is associated by Munchkin initializing (fetching the tracking pixel) on a mkt_tok-enized URL.  This is why association works automatically when you follow an email link, bounce off the branding domain, and arrive on your site.

Forms are only necessary if the lead does not follow an email link, but needs to identify her/himself manually (or automatically, if you get information posted over to you that identifies them).

Downloading a form just to submit it automatically, without adding any hidden fields, isn't necessary to associate leads.

Anonymous
Not applicable

Hi Sanford,

Im not expert but from hours of testing, just clicking the link from the email wouldn't do the trick. It seems that somehow after visiting SM Marketo was not able to associate the email to the final landing page. The minute I added a LP before the survey, the problem was fixed.

Would you know why this occurred?

SanfordWhiteman
Level 10 - Community Moderator

I explained this above.

When you click a link in an email and the destination page is running Munchkin, the lead is associated automatically (that is the reason the mkt_tok URL param is added).

When you click a link in an email and the destination page is not running Munchkin (i.e. SurveyMonkey), the lead is not associated because the destination page has no idea what to do with the mkt_tok.

If you can forward the the mkt_tok back to your site, then the association can be run again as originally expected.

Anonymous
Not applicable

So Sanford, Is the following correct for this scenario?

a> If Survey Monkey does carry over mkt_tok, there is no need to have any Marketo landing page before Survey Monkey page.

b> If it does not (most likely here), just have the (tracked) link in the (Marketo) email go to a Marketo landing page which will simply redirect to the Survey Monkey page. Is this correct?

regards

Rajesh

SanfordWhiteman
Level 10 - Community Moderator

So Sanford, Is the following correct for this scenario?

a> If Survey Monkey does carry over mkt_tok, there is no need to have any Marketo landing page before Survey Monkey page.

b> If it does not (most likely here), just have the (tracked) link in the (Marketo) email go to a Marketo landing page which will simply redirect to the Survey Monkey page. Is this correct? 

Yep, that's right.

The question is how to most efficiently and reliably accomplish (b).  Whatever is doing the associating -- standard Munchkin init() or form -- must complete its HTTP request.  The response in itself is not important, but the request must be complete.

A form has the theoretical advantage of having a built-in confirmation of request-response complete (the onSuccess handler that you can hook into).  But it has the disadvantage of creating an extra Filled Out Form event that is going to look pretty strange coming right before another form fillout (the survey).  I'm not above adding extra events like this when it's the only way, but it's not a perfect fit here.

Munchkin is by default asynchronous.  Meaning you can't simply run Munchkin.init() followed immediately by the document.location because Munchkin will not have finished bootstrapping and loading.

If you are not comfortable ensuring Munchkin runs reliably, you can use the form, but just be aware that it's not ideal.

Anonymous
Not applicable

Hi All,

I have decided to try the JS path and all seems to be working excellently. Thank you all very much for your assistance

<script src="//app-ab02.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_2190" style="display:none"></form>

<script>MktoForms2.loadForm("//app-e.marketo.com", "999-XXX-999", 1272, function(form) {

    MktoForms2.whenReady(function (form) {

             form.submit();

        });

});

MktoForms2.loadForm("//app-sjst.marketo.com", "785-UHP-775", 1057, function(form) {

    //Add an onSuccess handler

    form.onSuccess(function(values, followUpUrl) {

        // Take the lead to a different page on successful submit, ignoring the form's configured followUpUrl

        location.href = "https://google.com/?q=marketo+forms+v2+examples";

        // Return false to prevent the submission handler continuing with its own processing

        return false;

    });

});

</script>

Regards

Matt

SanfordWhiteman
Level 10 - Community Moderator

You certainly don't want to load the form twice.  That defeats the purpose. 

MktoForms2.loadForm(..., function(form){

     form.onSuccess(function(values,followUpURL){

          location.href = '{your_survey_monkey_url_here}";

          return false;

     });

     form.submit();

});

Anonymous
Not applicable

Just when I thought I could put this one to rest and crack a beer

Sorry Sanford, don't know if im tired, but when I try this edit it doesn't work.

Can you please be a little more specific on what I should be changing.

Thanks

Matt

SanfordWhiteman
Level 10 - Community Moderator

<script src="//app-ab02.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_2190" style="display:none"></form>

<script>

    MktoForms2.loadForm("//app-ab02.marketo.com", "{munchkinId}", 1272, function(form) {

        form.onSuccess(function(values, followUpURL) {

            location.href = '{surveymonkey}';

          return false;

     });

     form.submit();

});

</script>

Where {surveymonkey} is the SM URL and {munchkinId} is your actual AAA-BBB-CCC ID, which you've been obfuscating.

Grégoire_Miche2
Level 10

Hi Sanford and Matthew Varone,

1/ You can set up the follow-up page when defining the form in Marketo, you do not need to do it in the JS.

2/ Matthew, do not forget to replace the 1272 form ID from my example into you own form ID (apparently 2190).

So the code should like this :

<script src="//app-ab02.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_2190" style="display:none"></form>

<script>

     MktoForms2.loadForm("//app-ab02.marketo.com", "999-XXX-999", 2190, function(form) {

          MktoForms2.whenReady(function (form) {

               form.submit();

          });

     });

</script>

There is an even simpler version that may work, but I am not sure, as it does not seem to wait until the form is completely loaded, since it does not use the whenReady method :

<script src="//app-ab02.marketo.com/js/forms2/js/forms2.min.js"></script>

<form id="mktoForm_2190" style="display:none"></form>

<script>

     MktoForms2.loadForm("//app-ab02.marketo.com", "999-XXX-999", 2190, function(form) {

          form.submit();

     });

</script>

In red are the items you need to change from your own environment.

-Greg