Even if the data is "anonymous" (a meaningless term) and aggregated in some form, this is still an unimaginably huge quantity of student data that Google have captured and saved for themselves.
Rather than ask what kind of tracking is acceptable, we should instead ask: why is tracking of students (who have no choice in the matter) even considered acceptable in the first place?