>>s1k3s+Z5
Ye olde days of tracking just used invisible .gifs and every click was a different webpage so they just tracked which ones were requested to gain interaction metrics.
JS doesn't have any magic to it, location information is opt-in, but your IP is a much better advertising identifier.