Hiya all,
Has anyone got a way of hiding (and for that matter showing) non Marketo web elements based on someone being a known person in Marketo?
Cheers
Jo
Solved! Go to Solution.
First — for the lurkers — we mean “(a) the current pageview or (b) the stored Munchkin cookie in the current browser session is directly associated with one existing person in your Marketo instance.”
The answer is to use Known Visitor HTML (KV HTML) and a hidden form. When the form is ready (whenReady) you can check if the KV HTML is present in the DOM; alternately (though I find this a bit messy) you can put JS in the KV HTML block itself. Either mark up the body tag with a special CSS class or take any other action you want using JS.
Naturally this assumes the elements on the page have already been prepared to be shown/hidden using this method. You might even be using a client-side template framework and not inject certain elements unless you’re in known mode.
First — for the lurkers — we mean “(a) the current pageview or (b) the stored Munchkin cookie in the current browser session is directly associated with one existing person in your Marketo instance.”
The answer is to use Known Visitor HTML (KV HTML) and a hidden form. When the form is ready (whenReady) you can check if the KV HTML is present in the DOM; alternately (though I find this a bit messy) you can put JS in the KV HTML block itself. Either mark up the body tag with a special CSS class or take any other action you want using JS.
Naturally this assumes the elements on the page have already been prepared to be shown/hidden using this method. You might even be using a client-side template framework and not inject certain elements unless you’re in known mode.
thanks for this. It feels awfully clunky, but I guess there is no way around it.
Cheers
Jo
It’s gonna be the only supported way. In the past I used the /getKnownLead endpoint directly but given the way the library has evolved that would be too risky now.