Hi All,
I'm having an issue on our corporate website of capturing the _mkto_trk value within a hidden field, from the cookie dropped by the Munchkin.js script. It seems to be sporadically appearing and this is obviously an issue that impacts Anonymous > Known attribution. Can anyone help?
Image below of location of form :
What exactly do you want to do?
Marketo itself handles Anon > Known so you shouldn't have to manually deal with that.
Hi Josh,
I’d like to pull in the Marketo Cookie ID as per the ‘Server Side Post’ setup the mktotrk field on my form in order to aatribute past web behaviour to the known lead that is generated in the system.
Josh Soffe
Marketing Technology Manager
BAE Systems Applied Intelligence
Hey Josh,
Could you describe how the form is built? Is it possible that the form is loading on the page after the munchkin script has already executed, at least some of the time (i.e. a racing issue)?
Hi grant,
Thanks for reaching out.
The form loads in a light box on clicking the contact button. This even would indeed happen after the script has loaded. The form is a server side post you can take a look at the form using the screenshot I supplied below?
Sent via Email+ secured and managed by MobileIron
First, server-side post is not really recommended. The "form proxy" pattern (client --> your server --> Marketo's server) is rate-limited and complex, and typically unnecessary.
The mkto_trk cookie is generated in the browser, but the Munchkin library needs to have bootstrapped, downloaded, and initialized first, and if you are using excessive and/or broken asynchronous loading, this may not complete before the form is populated.
But a screenshot isn't really possible to troubleshoot. We need the actual URL. Is this https://www.baesystems.com? I don't see Munchkin even attempting to load there.
Hi Sanford,
The form appears in a pop-up after clicking the ‘Contact Sales’ button about halfway down this site http://www.baesystems.com/en/cybersecurity/home (which is tracked by asynchronous JQuery Munchkin)
Josh Soffe
Marketing Technology Manager
BAE Systems Applied Intelligence
Well, the _mkto_trk is present in the browser and is sent in the HTTP headers when the form's HTML fragment is requested, but it doesn't end up in the form's hidden field _mkt_trk.
I assume you expect the _mkt_trk to be rendered on your server ("burned" into the form HTML, if you will) based on the cookies the server receives in the request. If so, the bug is in your server code, because it does have the cookie sent to it, but it isn't putting it in the HTML response.
Thanks for the help - I found that as the form was opening in a lightbox that the form HTML was being loaded from an external source so the cookie value wasn't being burned in on page load. Issue is resolved by attached the Munchkin script to the external location so on load (render) the value is attached.
As long as the external location shares a parent domain with the main location (pages.example.com/www.example.com) then the Munchkin cookie will already be in the browser's cookie store. You don't need to load (nor init()) Munchkin to access the cookie. In fact I don't advise loading Munchkin in an IFRAME like this (which seems to be what you're talking about) because then you see a needless Visit Web Page activity for the LP every time somebody loads the form.