Ah, there's the rub.
Yes, the Marketo
servers know whether or not a Munchkin cookie is associated with a named lead, and the identity of the named lead if so. (Web activities are always mapped to a lead "in the database" -- the difference is whether that lead is anonymous or named.)
But on the browser side, there is no published way of simply interrogating whether the current cookie is associated or not. You can record when an entry page contains a tracking token from an email link... you can record whether a form was successfully submitted... and you can log when the Munchkin associateLead() function was called (three major ways a cookie becomes associated) but even if you make the technical effort to record those actions and set your Custom Dimension accordingly, you aren't getting a true/false result but at best making a good guess. (The reason it's still a guess is that those methods will if appear to "succeed" even if they don't really succeed in associating: for example, as we ran into at our own company, associateLead() won't kick back an error if the email hashing algorithm is implemented incorrectly.)
However, there may be an undocumented way to quickly get a true/false on this that I have been working on. I would rather not get into it in the public forums. If you would like to help me with testing it please
contact me directly.