Hey everybody,
Does anyone successfully use the .getPageFields() forms2.0 method to get data?
I have been trying to fill the object with data but I feel like its always empty (printed in console) -
Object {cr: "", kw: "", q: ""}
I tried to refer from google and facebook but nothing seemed to pass through. Any thoughts?
Sanford Whiteman maybe you'll know
cr and kw will populate from the current URL (on your site). Does that not work for you?
Unfortunately, the line in MktoForms2::getPageFields to parse the referrer's query string is broken (it looks at the wrong part of the referrer URL), so you shouldn't expect q to work.
Complicating matters:
For all the above reasons it's best practice to encode the source in the destination URL, that is, instead of expecting to see q=crazee in the referrer URL, put source=crazee in the destination URL.
Yeah even the cr kw don't populate from https to https pages even though document.referrer was giving expected result.
It was actually just to see referrer internally but that wasnt working so I was trying other referrers Im not sure why I expected to see anything from google as they basically give nothing nowadays.
Thanks for your helpful input.