plantuml
@startuml
actor User
participant Browser
participant "Content Site" as Site
participant "Topics API" as TopicsAPI
participant "Ad Platform" as AdPlatform
User -> Browser: Visit website
Browser -> Site: GET /article/api-design
Site --> Browser: 200 OK\nObserve-Browsing-Topics: ?1\n<HTML content>
Browser -> TopicsAPI: Observe page content
TopicsAPI -> TopicsAPI: Classify page\n(e.g., "Technology", "Software Development")
TopicsAPI -> TopicsAPI: Update user's topic history
== Later: Ad Request ==
User -> Browser: Visit news site
Browser -> AdPlatform: Request ad with Topics API
Browser -> TopicsAPI: document.browsingTopics()
TopicsAPI --> Browser: ["Technology", "Finance", "Travel"]
Browser -> AdPlatform: Fetch ad for topics
AdPlatform --> Browser: Relevant ad (no user ID tracking)
note right: Privacy-preserving targeting\nusing topics, not user identity
@enduml