The title is a little overly broad; as far as I can tell the only part of analytics that'll be impacted is setting cookies solely for tracking purposes. Lots of other kinds of web analytics will be fine. For example, you can do statistical analysis of your Apache logs, or of other cookies that you set in the regular course of operating the webapp.
For example, you can do statistical analysis of ... other cookies that you set in the regular course of operating the webapp.
That is a grey area at best.
For one thing, a cookie that has a dual purpose, controlling both logging in and analytics, appears to give up any exemption on the grounds of strict necessity that a cookie used only for logging in would be granted. You would probably be required to provide all kinds of explicit information about your use of the cookie to anyone before allowing them to log in and setting that cookie, adding at least one extra step to your sign-up process (or making use of a single sign-in service much less convenient for your visitors).
For another thing, that still restricts your analytics to cases where someone is already logged in or otherwise actively using your site. Often the more interesting things to know relate to visitors to your site who are not (yet) so active: what are your best traffic sources/keywords, where do new people come into your site and where do they go next, and where do they give up if they don't convert?
Well, yes, but presumably you would ask your users to set those. For example, if you use Gmail, presumably you will agree to let Gmail set your login cookie. Then Google can do web analytics keyed off that; the law doesn't actually ban doing analytics.
Right, so the majority of websites are now required to display the warning and request opt-in.
You don't see how this is a major pain?
You can already get this behavior in your browser by changing user settings. Just try to surf like that for a while. It's horrendous, and what's worse, it doesn't make the user any wiser, really.