Towards Seamless Tracking-Free Web: Improved Detection of Trackers via One-class Learning

Numerous tools have been developed to aggressively block the execution of\npopular JavaScript programs (JS) in Web browsers. Such blocking also affects\nfunctionality of webpages and impairs user experience. As a consequence, many\nprivacy preserving tools (PP-Tools) that have been developed to limit online\ntracking, often executed via JS, may suffer from poor performance and limited\nuptake. A mechanism that can isolate JS necessary for proper functioning of the\nwebsite from tracking JS would thus be useful. Through the use of a manually\nlabelled dataset composed of 2,612 JS, we show how current PP-Tools are\nineffective in finding the right balance between blocking tracking JS and\nallowing functional JS. To the best of our knowledge, this is the first study\nto assess the performance of current web PP-Tools.\n To improve this balance, we examine the two classes of JS and hypothesize\nthat tracking JS share structural similarities that can be used to\ndifferentiate them from functional JS. The rationale of our approach is that\nweb developers often borrow and customize existing pieces of code in order to\nembed tracking (resp. functional) JS into their webpages. We then propose\none-class machine learning classifiers using syntactic and semantic features\nextracted from JS. When trained only on samples of tracking JS, our classifiers\nachieve an accuracy of 99%, where the best of the PP-Tools achieved an accuracy\nof 78%.\n We further test our classifiers and several popular PP-Tools on a corpus of\n4K websites with 135K JS. The output of our best classifier on this data is\nbetween 20 to 64% different from the PP-Tools. We manually analyse a sample of\nthe JS for which our classifier is in disagreement with all other PP-Tools, and\nshow that our approach is not only able to enhance user web experience by\ncorrectly classifying more functional JS, but also discovers previously unknown\ntracking services.\n

Paper

Similar papers

© 2026 NYSGPT2525 LLC