ASTrack: Automatic Detection and Removal of Web Tracking Code with Minimal Functionality Loss
Ismael Castell-Uroz, Kensuke Fukuda, Pere Barlet-Ros
Abstract
Recent advances in web technologies make it more difficult than ever to detect and block web tracking systems. In this work, we propose ASTrack, a novel approach to web tracking detection and removal. ASTrack uses an abstraction of the code structure based on Abstract Syntax Trees to selectively identify web tracking functionality shared across multiple web services. This new methodology allows us to: (i) effectively detect web tracking code even when using evasion techniques (e.g., obfuscation, minification, or webpackaging); and (ii) safely remove those portions of code related to tracking purposes without affecting the legitimate functionality of the website. Our evaluation with the top 10k most popular Internet domains shows that ASTrack can detect web tracking with high precision (98%), while discovering about 50k tracking code pieces and more than 3,400 new tracking URLs not previously recognized by most popular privacy-preserving tools (e.g., uBlock Origin). Moreover, ASTrack achieved a 36% reduction in functionality loss in comparison with the filter lists, one of the safest options available. Using a novel methodology that combines computer vision and manual inspection, we estimate that full functionality is preserved in more than 97% of the websites.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
3 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Online Tracking: A 1-million-site Measurement and Analysis cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites Online Tracking: A 1-million-site Measurement and Analysis
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites (Cross-)Browser Fingerprinting via OS and Hardware Level Features
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- SoK: After Decades of Web Tracker Detection, What's Next? cites Online Tracking: A 1-million-site Measurement and Analysis
- SoK: After Decades of Web Tracker Detection, What's Next? cites Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors
- SoK: After Decades of Web Tracker Detection, What's Next? cites SINBAD: Saliency-informed detection of breakage caused by ad blocking
- SoK: After Decades of Web Tracker Detection, What's Next? cites Duumviri: Detecting Trackers and Mixed Trackers with a Breakage Detector
- SoK: After Decades of Web Tracker Detection, What's Next? cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
- SoK: After Decades of Web Tracker Detection, What's Next? cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- (Cross-)Browser Fingerprinting via OS and Hardware Level Features cites Online Tracking: A 1-million-site Measurement and Analysis
- (Cross-)Browser Fingerprinting via OS and Hardware Level Features cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
- SINBAD: Saliency-informed detection of breakage caused by ad blocking cites Online Tracking: A 1-million-site Measurement and Analysis
- SINBAD: Saliency-informed detection of breakage caused by ad blocking cites Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting Behaviors
- SINBAD: Saliency-informed detection of breakage caused by ad blocking cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- Duumviri: Detecting Trackers and Mixed Trackers with a Breakage Detector cites Online Tracking: A 1-million-site Measurement and Analysis
- Duumviri: Detecting Trackers and Mixed Trackers with a Breakage Detector cites SINBAD: Saliency-informed detection of breakage caused by ad blocking
- Duumviri: Detecting Trackers and Mixed Trackers with a Breakage Detector cites AdGraph: A Graph-Based Approach to Ad and Tracker Blocking
- AdGraph: A Graph-Based Approach to Ad and Tracker Blocking cites Online Tracking: A 1-million-site Measurement and Analysis
- AdGraph: A Graph-Based Approach to Ad and Tracker Blocking cites Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016
Cited by top-tier papers3
- SINBAD: Saliency-informed detection of breakage caused by ad blockingSaiid El Hajj Chehade, Sandra Deepthy Siby, Carmela TroncosoS&P 2024 · 3 citations
- SoK: After Decades of Web Tracker Detection, What's Next?Wolf Rieder, Philip Raschke, Thomas Cory, Christian René Sechting et al.S&P 2026 · 1 citation
- Duumviri: Detecting Trackers and Mixed Trackers with a Breakage DetectorHe Shuang, Lianying Zhao, David LieNDSS 2025
Builds on8
- Online Tracking: A 1-million-site Measurement and AnalysisSteven Englehardt, Arvind NarayananCCS 2016 · 798 citations
- Internet Jones and the Raiders of the Lost Trackers: An Archaeological Study of Web Tracking from 1996 to 2016Ada Lerner, Anna Kornfeld Simpson, Tadayoshi Kohno, Franziska RoesnerUSENIX Security 2016 · 273 citations
- (Cross-)Browser Fingerprinting via OS and Hardware Level FeaturesYinzhi Cao, Song Li, Erik WijmansNDSS 2017 · 199 citations
- Fingerprinting the Fingerprinters: Learning to Detect Browser Fingerprinting BehaviorsUmar Iqbal, Steven Englehardt, Zubair ShafiqS&P 2021 · 143 citations
- AdGraph: A Graph-Based Approach to Ad and Tracker BlockingUmar Iqbal, Peter Snyder, Shitong Zhu, Benjamin Livshits et al.S&P 2020 · 112 citations
Related papers
- Blocking Tracking JavaScript at the Function GranularityAbdul Haddi Amjad, Shaoor Munir, Zubair Shafiq, Muhammad Ali GulzarCCS 2024 · 3 citations
- TrackSign: Guided Web Tracking DiscoveryIsmael Castell-Uroz, Josep Solé-Pareta, Pere Barlet-RosINFOCOM 2021 · 18 citations
- Unbundle-Rewrite-Rebundle: Runtime Detection and Rewriting of Privacy-Harming Code in JavaScript BundlesMir Masood Ali, Peter Snyder, Chris Kanich, Hamed HaddadiCCS 2024 · 2 citations
- Read Between the Lines: Detecting Tracking JavaScript with Bytecode ClassificationMohammad Ghasemisharif, Jason PolakisCCS 2023 · 3 citations
- AdVersa: Adversarially-Robust and Practical Ad and Tracker Blocking in the WildChaejin Lim, Kiho Lee, Beomjin Jin, Heewon Baek et al.WWW 2026
