For our Marketo Landing Pages with Forms on them we want to capture what webpage url the form was filled out on. {{trigger.Web Page}} does not work because that only give the Marketo description name. We need the full url of the Landing Page. How can we do this?
Solved! Go to Solution.
You can change document.location to document.location.toString.split('?')[0]
Here is what I have but it is not removing the UTM parameters:
<script>
MktoForms2.whenReady(function(form){
form.addHiddenFields({"Latest_Form_Form_Webpage__c":document.location.toString.split('?')[0]});
})
</script>
document.location.toString().split('?')[0]
or (my preference)
document.location.href.split('?')[0]
Kenny and Sanford thank you for your help! You guys are awesome!
Cool man, keep asking the good questions...
I've got a one track mind these days. Fixed.
I don't think I could ever love/hate anyone as much as I love/hate documentation. If you're in a doc groove, I'm jealous.
document.location tho