>Germany (under the euphemism "migration background")
That's very different from the US keeping track of race though. After a generation there's no way for the German government to tell the children from naturalized citizens from other German citizens.
It's even weirder: in the US, ethnicity is a separate official category from race that has two buckets: either "hispanic or latino" or "not hispanic or latino". Which... what?
US got its initial Latino population from conquering bits of Mexico; and while in the US Latinos were a separate ethnic group from Anglos, the internal "racial" divisions in Mexican society between criollos and mestizos were important enough to collect data on.
(And criollos considered themselves "white" and were unlikely to mark themselves as "Hispanic" if it were presented as a separate option.)
"Migration background" is defined as by the Statistisches Bundesamt as anyone having at least one grandparent who immigrated after 1949. We're only just getting into the period where descendants of e.g. Croatian immigrants of the '50s are not classified as being of "Migration background".
This is, of course, only used for statistical purposes; this information isn't tracked on an individual basis for use in any day-to-day decisions.
That's very different from the US keeping track of race though. After a generation there's no way for the German government to tell the children from naturalized citizens from other German citizens.