Long version: probably. Allowing the sale of location data would be deeply unpopular among the general public. Under stare decisis, the federal government would have a good chance at beating the state in a court case, but it would still be a risk- why risk the power for an unpopular case?
See also: marijuana legalization and immigration. Arizona tried codifying the federal statutes on immigration into its own state laws- not superceding, just mirroring. The federal government took them to court and won. OTOH, marijuana is also distinctly within the federal government's purview, and Wickard would apply very easily to pot laws as well... And yet, they have done nothing at all, likely because pot is too popular to risk a court case (or an election, I suppose).
These things, imho, are rightfully within the purview of the states to implement. However, should the federal government declare there is a national interest (justification) for national regulation, then per court precedent it would compel the state to change. I do not believe there is any sort of jurisprudence for "grandfathering in" existing state laws. Just as prosecutors have discretion over what cases they actually prosecute, the government may choose to look the other way when state laws overlap the feds jurisdiction.
If they tried, though, the state would still have the recourse of attempting to go before the supreme court, which would involve upending existing precedent. I suspect the current court would be about as favorable towards limiting the interstate powers clause as it gets, but it isn't a given by any means.
Current court will end up on the side of business. guaranteed!
but it's not a blank check for the state of Massachusetts to regulate anything outside of Massachusetts, so you 1000% failed to address the question I raised. (1000% because you wrote a lot while not addressing the question about Massachusetts law being effective in this case where there is no countervailing US law)
Yes, Massachusetts may enforce the law within its own borders. Companies which buy or sell location data may not operate in Massachusetts without risking enforcement actions. If someone with a company's app travels through MA, their location data may likely still be sold if the company itself is not registered at all in MA.
HOWEVER, the law must also survive the inevitable federal court challenge when a company headquartered in another state, but with some small operating presence in MA, falls under some enforcement action... rendering the original question entirely moot, as I suspect there are no shortage of companies who would challenge the law.
Did this argument go anywhere with regards to say animal welfare laws and out of state farmers?
The only other aspect I think has to do with whether federal FDA and Agriculture regulations take any precedence over CA, but that's not interstate commerce.