Tracking a person's movement doesn't require GPS to be on if they connect to any networks. Every device has a unique ID, a unique address and every network it touches has a fixed location that can be triangulated. GPS makes that process faster, in some cases. Using masks or a vpn or other tools doesn't make it really harder or more difficult to determine the who, what and where of activity, it just makes it take slightly longer to manually do it. With an computer doing the tracing for you, it's the difference between half a second and two seconds maybe.
The good news is that these companies don't care what you as an individual are doing. They care about behavioral patterns in data that allow them to do a combination of cluster analysis and statistical regression for their advertising and data optimization procedures, and a brand of machine learning, very similar to the search algorithms, running server side are used to model your interactions with the environment. It's neural networking in a very real sense and it doesn't require specific knowledge of you to function, only for you to exist in a node or pathway that it can extrapolate it's own context from. That's what makes this so amazing... the computers needed to do this in civilian life 10 years ago were monstrous and now it's a combination of the cloud, a bank of integrated servers and a tiny box that gets slightly warm in your pocket.