Skip to content

Instantly share code, notes, and snippets.

@courtnEMAIL
Forked from entendu/mkto1.js
Created July 13, 2020 20:26
Show Gist options
  • Select an option

  • Save courtnEMAIL/e19116bf9f723a46c905811dae87df31 to your computer and use it in GitHub Desktop.

Select an option

Save courtnEMAIL/e19116bf9f723a46c905811dae87df31 to your computer and use it in GitHub Desktop.
Set Marketo fields
MktoForms2.loadForm("//app-sjXX.marketo.com", "XXX-XXX-XXX", formID, function(form) {
var myUTM = your_utm_function(); // This function is your custom logic to retrieve the user's UTM codes.
form.setValues({
"utm_source": myUTM.source;
"utm_campaign": // etc etc
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment