It is by no means against the law in Germany to use adsense or Google Analytics. You just have to get the consent of the user before you are allowed to have their personal information processed by a third party.
I'm not a lawyer. Anyway, I have yet to see a web site anywhere on the internet that asks the user for said content. So we'll just have to wait how it plays out once web sites start doing that.