Disclaimer: Links are in German. My German is quite rough. Quoted translations provided by Google Translate.
Turns out the question "Do I need an Impressum?" is complicated. I'll start with examining the case for companies, then work down to the average private citizen.
Impressum requirement
The requirement for an online Impressum comes from the Telemediengesetz (TMG) § 5:
1) Service providers are obliged to keep the following information readily available, readily accessible and constantly available for commercial, usually paid telemedia:
- the name and address under which they are established [...]
Applicability based on country of origin
The applicability of the TMG is described in §§ 2a, 3. Thankfully, there is a 2013 court case focused on these sections, involving an Egyptian company marketing cruises and not having a proper Impressum on their website. Also thankful is that law firm mth Tieben & Partner summarized this decision, because as it turns out, I cannot read judicial German.
Summarizing their summary, §§ 2a, 3 sets the standard that the required information is based on a country of origin principle (Herkunftslandprinzip), where if that country of origin is Germany, § 5 applies. However, this principle is rooted in EU directives, and as such is not applicable to non-EU countries. For these, the law falls back on the older principle of market location (Marktortprinzip). If the non-EU company advertises in Germany and thus participates in the German market, then it must have a valid Impressum.
I'll note that, the TMG considers Germany to be the "country of origin" if the company is either registered in or has significant operations in Germany (see the given sections for specifics). This is not the same "country of origin" as is found in copyright law.
Applicability to private website hosts
As it turns out, an Impressum is not required for private non-commercial websites. However, as pointed out by this Anwalt article, the wording of the TMG makes it such that omitting an Impressum may often be illegal. In particular, the definitions section of the TMG provides very broad definitions of "Service provider" (Diensteanbieter):
Service provider shall mean any natural or legal person who provides his own or third-party telemedia for use or provides access to use; in the case of audiovisual media services on demand, service providers shall mean any natural or legal person who effectively controls the selection and design of the content offered,
and "commercial communication" (kommerzielle Kommunikation):
Commercial communication means any form of communication which serves the direct or indirect promotion of the sale of goods, services or the appearance of an undertaking, other organization or a natural person engaged in trade, trades or crafts or a liberal professions; [...]
Conclusion
In terms of variables like the one you suggest, the proper "variable" for companies is the country of origin. For private web hosts, I would argue that residency is the closest analogue to country of origin as defined in TMG §§ 2a, 3. Location of server doesn't matter, and I don't think citizenship does either.
With that in mind, the values would be:
- Germany: Required
- EU: Not required
- Rest of world: Required if advertised/directed in/towards Germany.
with the caveat that truly private non-commercial websites never require an Impressum.