I've been digging around to figure out how to handle a multi-part referral form. The basic flow is:
- A partner/referrer fills out a form with their information
- They then fill out a form with the information of the propect/referred-person, pre-populating a hidden field with the email address provided in Step 1 so that they get credit for the referral
- They have the option to go back to #2 and repeat the process
Having cobbled together a solution, I have the second form set up using this solution:
//add a callback to the first ready form on the page
//add the tracking field to be submitted
//clear the value during the onSubmit event to prevent tracking association
This works insofar as I end up with two separate people in Marketo's database - one from each form. But what I've found is that the second form still seems to set a new cookie on the person, so the confirmation page visit is attributed to the referred prospect, as opposed to the partner initiating the referral.
How can I keep the tracking cookie from Step 1 intact throughout this process and never set one during Step 2?