Our wordpress site has the Marketo munchkin code. I'd like to be able to pass something like this to ALL pages and set a cookie which I can then recall when we actually put an embedded form on another page
1. Visitor enters the site via this url:
2. If source Cookie has not been set with the value
3. Later, the visitor goes to a nonMarketo page with an embedded Markto form. Form queries the cookie value and sets it to a hidden field (Lead Source).
Can someone point me out to an article about this if it's already been answered? I looked and didn't really find it.
This is very possible and many Marketo users have done this. You'll need to work with your engineers to write the script that reads the cookies and populates the field values with the cookie value. They should be able to make it so that it works on *.abcxyz.com and is therefore both Marketo and corporate site friendly.
I wouldn't bother with a cookie here if it's all on the same origin. That's just more libraries to load (though I've written my own cookie library in the past, going with widely-used libraries is a better bet, but you end up with another script include).
What you're talking about is saving the source query param when you first see it (not overwriting it), then injecting it into each form. Like so: MktoForms2 :: Touch to Field
I'm not going to recommend GTM for anything. Where you load the script(s) from is up to you.