SOLVED

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
Nicholas_Manojl
Level 9

This is a long thread with an easy answer.

The first link needs to be to a page with the Marketo cookie on it - ie, your company website or a Marketo landing page. You can just make a simple page which then links to the Survey Monkey.

Otherwise your program will only work with people who have already been cookied.

Grégoire_Miche2
Level 10

Not that simple, because your method adds a click. The point was to avoid that click...

Nicholas_Manojl
Level 9

The page can be automatically redirected quite simply without any action from the user.

Anonymous
Not applicable

Hi Nicholas,

A colleague suggested this by creating a re-direct in admin, but this didn't seem to work out.

Nicholas_Manojl
Level 9

No, I don't know how Marketo does redirects via the Admin section but you'd get the job done by sticking <meta http-equiv="refresh" content="5; url=http://www.example.com/" /> at the top of your page.

Anonymous
Not applicable

Its funny how a project never ends, now I have gotten to this this point, Im looking into adding a JS spinning wheel on the LP so that in the brief 3 sec wait leads know something is happening.

I found this great resource, now just to figure it out spin.js

SanfordWhiteman
Level 10 - Community Moderator

How about if we just take out the need for the user to experience any wait time?

Open a PM with me and Greg and we can get you the synchronous, as-instantaneous-as-possible way to do this.

ETA: I'm working with Matthew offline so he can get the zero-delay synchronous version running.

Anonymous
Not applicable

Thankyou Greg and Sanford.

It is working well. I appreciate all you help, I learnt a lot from this experience.

Cheers

Matt

Grégoire_Miche2
Level 10

If you take the time to read the thread, you may learn a few things about the sequence of actions.

Anonymous
Not applicable

Hi Greg,

I know Im pushing my luck when the form loads you can see the form field, is there an easy way to make it hidden?

Thanks

Grégoire_Miche2
Level 10

Hi Matthew,

You have forgotten the display:none

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

To make it quicker, you can also remove the email address field from the form.

-Greg

Nicholas_Manojl
Level 9

Yes, but if I read the whole thread I'd have to read all the red-herrings about program status, do-not-track, link tracking etc..

SanfordWhiteman
Level 10 - Community Moderator

No. You need to read what I wrote about the race condition multiple times above. If you automatically redirect you are guaranteed to fail for the same reason. (And adding a sloppy/guessy timer is poor programming.)

Nicholas_Manojl
Level 9

You're definitely not guaranteed to fail if you use a "sloppy/guessy" timer, no matter how poor the programming is.

You can decide if you want a click or if you want the user to wait 5 seconds.. or you can spend over a day trying to shoehorn the Marketo tracking code. I know as a marketer and not a developer I'd just go with the option that works and spend my time doing more important things.

SanfordWhiteman
Level 10 - Community Moderator

You're definitely not guaranteed to fail if you use a "sloppy/guessy" timer, no matter how poor the programming is.

If you don't understand the race condition at work here, and don't understand how fallible Munchkin tracking can be under some circumstances, you may think that's true.

The reality is that asynchronous programming requires thorough logic, not guesswork.  With a high guess like 5 seconds, yes, you will succeed 99% of the time, but always at the cost of 5 seconds of wait time.

With a correct synchronous implementation, you will succeed 100% of the time and redirect the user as quickly as 100ms, never making them wait any longer than is absolutely mandated by network and server conditions.

Grégoire_Miche2
Level 10

Hi Sanford,

to add to your point, I usually feel safer to be guaranteed not to fail than not to be guaranteed to fail

-Greg

Grégoire_Miche2
Level 10

Hi Matthew Varone,

It is very likely that people are not member of your program in the "Invited" Status. 2 things to change :

  1. Make sure that the smart campaign that sends the email has a "change program status" -> Invited flow step
  2. Remove the "program status" constraint in the "member of program" filter.

An alternative would be to remove the "member of program" filter and replace it with a "was sent email" filter.

-Greg

Anonymous
Not applicable

Hi Gregoire

I think I have set that up the right way.

pastedImage_0.png

I have a feeling its because the cookies are not working correctly. I say this because, on the landing page there is an option to sign up to the newsletter. When I check this it appears that a new lead has been acquired.

pastedImage_1.png

Im really stumped

Anonymous
Not applicable

If it helps here is a screen of the entire program.

I have tested my wifes email on another computer and it didnt fire.

pastedImage_0.png

Grégoire_Miche2
Level 10

Hi Matthew,

Of course, "visited web page" trigger is dependent on cookie.

Also, make sure you have left the link traceable in the text editor, as below. It will make sure the person is cookied.

pastedImage_0.png

You may also want to direct the person to a Marketo LP PRIOR to going to SurveyMonkey, and alos after, so that the survey is "embedded" within 2 Marketo LP's.

Otherwise, you may consider the Marketo / SurveyMonkey connecter, sold by SurveyMonkey, but it's a little expensive.

-Greg