How the Web Tracks You / Targeted Advertising

UCSD CSE 190/291, Fall 2026

The goal of the course is to introduce students to the vast tracking ecosystem that underlies the web. Everyone is likely aware that the price users pay for "free" information online -- from the YouTube video you use to study to your favorite niche subreddit -- is seeing dozens of targeted ads. But fewer are fully aware of the immense volumes of data that are stored and sold in order to place those advertisements. And fewer still understand the technologies used to power this economy. This course will show why the web evolved this way, how those targeted ads are placed, and why companies are willing to pay for this advertising.

Specific topics will include technical introductions to fundamentals of the web (i.e., the protocols and infrastructure that support the web today), tracking techniques including cookies and browser fingerprinting, the mechanics of ad auctions, as well as marketing databases and targeting inferences. Students will also learn about the history of advertising, tactics companies use to persuade consumers, and the ethical implications of a surveillance capitalism economy.

By the end of the course, students will also know how to implement these technologies in practice, including hands-on experience (through PAs) with cookie-based tracking and inference, browser / device fingerprinting, and ad blocking technologies. To complete the projects in this course, you will need to have (or gain) familiarity with all aspects of web programming, not limited to — web server deployment, JavaScript, web databases (e.g. SQL), client/server applications, and web extensions. What is taught in class will not be all you need to understand on these topics; you will be expected to pick up what you need for each project on your own.

Course Information

Lectures:

All students are welcome to attend either or both sessions.

Instructors: Deepak Kumar, Kristen Vaccaro
Deepak OH: Tuesday 4–5 PM, or by appointment, CSE 3112
Kristen OH: Thursday 9–10 AM, CSE 3226

TAs: Haodi Zou, Edward Zhou
Haodi Office Hours: Tuesday 5–6 PM, Zoom; Wednesday 4–5 PM, CSE B240A
Edward Office Hours: Monday 5–6 PM, CSE B260A; Wednesday 11–12 PM, CSE basement

Prerequisites: CSE29 or equivalent.

Communication: We use Piazza for announcements and course communication; You can find the syllabus here.

Submissions: All course assignments will be submitted through Gradescope, through the specific Canvas of the course you are enrolled in.

Schedule

The tentative schedule and readings for the class are below:

9/24  Introduction and Administrivia (DK) [slides]

Course introduction, definitions, keeping track of tracking.

9/29  Web Introduction (DK) [slides]

What is the web? How was it built? How did we get here, and why does it enable tracking?

10/1  Databases (KV)

What is a database, and why are they useful for tracking?

10/6  Stateful Tracking, Part 1 (DK)

Cookies, JavaScript, and Databases

10/8  Stateful Tracking, Part 2 (DK)

Policies, history, where tracking is going

10/13  No class!

Class is cancelled today. Work on your PAs!

10/15  Inference 101 (KV)

How do companies learn more about you, machine learning 101.

10/20  History of Tracking and Advertising (KV)

How did we get here?

10/22  Online Advertising, Part 1 (DK)

Supply, Demand, and Real-time Bidding

10/27  Online Advertising, Part 2 (DK)

Supply, Demand, and Real-time Bidding (more)

10/29  Influence and Persuasion (DK)

Advertising, business, and you.

11/3  Guest Lecture!

TBA, likely via Zoom

11/5  Midterm

11/10  Midterm Review / Intro to Fingerprinting (KV)

Stateless tracking and why we need it

11/12  Stateless Tracking, Part 1 (KV)

Playing offense.

11/17  Stateless Tracking, Part 2 (KV)

Playing defense.

11/19  Ad Blocking (KV)

Playing defense.

11/24  Surveillance Capitalism (DK)

Is this the world we wish to live in?

11/26  No class

Class is cancelled today, happy Thanksgiving!

12/1  Guest Lecture

Guest Lecture from Elisa Luo, a PhD student who works on web tracking.

12/3  The Last Word (DK)

A smattering of everything we couldn't cover.

Course Structure

This is a typical project and exam structured course. Grading is based on the following components:

Attendance (5%)

Attendance is mandatory in class and constitutes 5% of your grade. You can miss up to 2 classes without penalty and without needing to justify your absence. If you have additional conflicts, please contact staff on Piazza.

Programming Assignments (40%)

There are three programming assignments (PAs) in the course. The first is worth 18% of your grade, the second is worth 12% of your grade, and the third is worth 10% of your grade. The schedule of release and due dates for PAs are displayed below. All assignments MAY be done in teams of two, but no more than two per team. Teams can change from PA to PA.

  • PA1 (Part 1) - Release 9/24/26, Due 10/1/26 11:59:59pm PT
  • PA1 (Part 2) - Release 9/24/26, Due 10/13/26 11:59:59pm PT
  • PA1 (Part 3) - Release 10/14/26, Due 10/22/26 11:59:59pm PT
  • PA1 (Part 4) - Release 10/14/26, Due 10/29/26 11:59:59pm PT
  • PA2 - Release 10/30/26, Due 11/19/26 11:59:59pm PT
  • PA3 - Release 11/20/26, Due 12/3/26 11:59:59pm PT

Midterm (20%)

There will be one in-class midterm (90 minutes) in week 6 on 11/5 . The midterm will cover material from all the lectures, readings, and programming assignments.

Final (35%)

The final exam will be: Undergraduate students (CSE190): December 10th, 2026, from 3pm to 6pm. Graduate students (CSE291): December 11th, 2026, from 11:30am to 2:30pm.

The final exam will be comprehensive over the whole course, but with material weighted towards the second half of the course. We will automatically substitute the midterm grade with your final grade if you score on the final is higher than the midterm.