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
4. Program status changed to > completed survey
I have been trying unsuccessfully for a day to sort this.
Thanks
Matt
Solved! Go to Solution.
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.
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.
Not that simple, because your method adds a click. The point was to avoid that click...
The page can be automatically redirected quite simply without any action from the user.
Hi Nicholas,
A colleague suggested this by creating a re-direct in admin, but this didn't seem to work out.
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.
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
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.
Thankyou Greg and Sanford.
It is working well. I appreciate all you help, I learnt a lot from this experience.
Cheers
Matt
If you take the time to read the thread, you may learn a few things about the sequence of actions.
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
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
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..
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.)
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.
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.
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
Hi Matthew Varone,
It is very likely that people are not member of your program in the "Invited" Status. 2 things to change :
An alternative would be to remove the "member of program" filter and replace it with a "was sent email" filter.
-Greg
Hi Gregoire
I think I have set that up the right way.
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.
Im really stumped
If it helps here is a screen of the entire program.
I have tested my wifes email on another computer and it didnt fire.
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.
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