Topics API, तीसरे पक्ष की कुकी का इस्तेमाल किए बिना, दिलचस्पी के हिसाब से विज्ञापन दिखाता है.
How the Topics API works
The Topics API can be used to observe and provide access to topics that appear to be of interest to the user, based on their activity. The Topics API can then give API callers (such as ad tech platforms) access to a user's topics of interest, but without revealing additional information about the user's activity.
Key concepts
- A topic is a human-readable topic of interest for the current user and is part of the Topics taxonomy.
- A caller is an entity, such as an app, a third-party SDK, a website, or service, that makes a request to the Topics API to observe or access a user's interests.
- A topic is observed by a caller, if the caller made a Topics API request from a web page or app associated with this topic during the past three epochs.
- An epoch is a period of topic computation, which defaults to one week.
- A taxonomy is a hierarchical list of categories, which includes, for example, such categories as
/Arts & Entertainment/Music & Audio/Soul & R&B
and/Business & Industrial/Business Services/Corporate Events
. - Topics are derived using a classifier model that maps user activity to zero or more topics.
Topics API flow core steps
The Topics API lifecycle has three main steps:
- Observe user activity, such as when they visit the web page
https://cats.example/tabby/index.html
or download the appcats
. - Derive topics from user activity, for example
/Pets & Animals/Pets/Cats
. - Access topics previously observed for the user, for example as a signal to select relevant advertising (such as a cat food promotion).
Observe topics
Callers can only access topics of interest that they've observed. A caller observes a topic when they make a Topics API request from a context associated with this topic. To illustrate this concept, consider the following simplified example.
- Suppose there are two Topics API callers: A and B.
- There are two contexts:
- Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic
Home & Garden
. - Tennis exercises, for example an app named Tennis Exercises or a website tennis.example, associated with the topic
Sports/Tennis
.
- Greenhouse, for example an app named Greenhouse or a website greenhouse.example, associated with the topic
- Both caller A and B are present in the context of Greenhouse.
- Only the caller B is present in the context of Tennis exercises.
- Assume that no topics were observed for the user before epoch 1, for the sake of simplification.
- The user visits the Greenhouse app, and callers A and B make a Topics API call to record the user visit to the page or app (see the implementation guide suggested in Next steps to find out how to call the Topics API). This record (a hostname or app data) is later used to derive topics of interest. The Topics API will later mark the topic
Home & Garden
as observed by both callers A and B. - The user visits the Tennis exercises app. Only the caller B sends a Topics API request. The Topics API will later mark the topic
Sports/Tennis
as observed by the caller B. - By the end of the epoch, the Topics API refreshes the user's top topics and determines the callers that observed these topics based on user activity.
- Later, when the caller B makes another Topics API call, it can get either
Home & Garden
orSports/Tennis
topic (or, with a 5% chance, a random topic) for this user in the response array. - Caller A can only access the topic
Home & Garden
, as it has never observed the topicSports/Tennis
. This means that a third-party will only learn about a user's topic of interest within the specific context (app or website) where it is present.

Derive topics
Topics derives topics of interest from user activity. The topics are selected from a predefined open-source taxonomy. Once per epoch, Topics refreshes the user's top five topics and the callers that observed them during the epoch. The Topics classifier model derives topics from user activity: hostname for a web page visit, app information on Android.
Caller accesses user's topics of interest
The API returns only topics that have been observed by the caller within the most recent three epochs. A maximum of three topics may be returned to a caller,one topic for each of the three recent epochs (if the caller observed topics for that epoch). The returned topics can be used by the caller to supplement any contextual information and can be combined to help find a more relevant ad for the user.
Epochs
The Topics API must ensure that the topics of interest it provides are kept up to date. The topics are inferred for a user based on their activity during a period of time known as an epoch, one week by default. Each user has their own epochs (epochs are "per user") and the initial start time is randomized.
Once each epoch, the Topics API computes the user's top five topics and determines which callers observed those topics using on-device information. The topic selected for each epoch is randomly selected from the user's top five topics for that time period. To further enhance privacy and ensure that all topics may be represented, there is a 5% chance the topic is randomly selected from all possible topics in the taxonomy of interests.
वेब पर विषयों को इस्तेमाल करने का तरीका
वेब पर, विषयों का अनुमान, उपयोगकर्ता के देखे गए पेजों के होस्टनेम से लगाया जाता है. उदाहरण के लिए, वेबसाइट dogs.example के लिए अनुमानित विषय /पालतू जानवर और जानवर/पालतू जानवर/कुत्ते हो सकता है.
यहां दिए गए डायग्राम में एक आसान उदाहरण दिया गया है. इससे पता चलता है कि Topics API, विज्ञापन टेक्नोलॉजी प्लैटफ़ॉर्म को सही विज्ञापन चुनने में कैसे मदद कर सकता है. इस उदाहरण में यह माना गया है कि उपयोगकर्ता के ब्राउज़र में पहले से ही एक मॉडल मौजूद है, जो वेबसाइट के होस्टनेम को विषयों से मैप करता है.

ब्राउज़र, Topics API को कॉल करने वाले कोड के कॉन्टेक्स्ट से कॉलर के ऑरिजिन का पता लगाता है. इसका मतलब है कि Topics के उपयोगकर्ता, अपने ऑरिजिन से iframe में एपीआई को कॉल करते हैं या अपने ऑरिजिन में फ़ेच में विषयों को शामिल करते हैं.
उदाहरण के लिए, सप्लाई-साइड प्लैटफ़ॉर्म (एसएसपी) को कई पब्लिशर की साइटों पर एम्बेड किया जा सकता है. इसके बाद, एसएसपी अपने शुरुआत की जगह से iframe में Topics API को कॉल कर सकता है. इससे, वह पब्लिशर की साइटों पर उपयोगकर्ता से जुड़े विषयों को देख सकता है. इसके बाद, इन विषयों को मांग पक्ष के प्लैटफ़ॉर्म (डीएसपी) के साथ शेयर किया जा सकता है, ताकि वह उपयोगकर्ता के लिए काम का विज्ञापन चुन सके.
एपीआई यह कैसे तय करता है कि कॉल करने वाले लोगों को कौनसे विषय दिखें
API कॉलर को सिर्फ़ वे विषय मिलते हैं जिन्हें उन्होंने हाल ही में देखा है. साथ ही, किसी उपयोगकर्ता के लिए विषयों को हर एपच में एक बार रीफ़्रेश किया जाता है. एपच, एक समयावधि होती है. Chrome में इसे एक हफ़्ते के लिए सेट किया गया है. इसका मतलब है कि एपीआई एक रोलिंग विंडो उपलब्ध कराता है, जिसमें कॉल करने वाले व्यक्ति को निगरानी में रखे गए विषय मिल सकते हैं.
नीचे दी गई टेबल में, किसी एक एपिक के दौरान उपयोगकर्ता के ब्राउज़िंग इतिहास का एक उदाहरण दिया गया है. हालांकि, यह उदाहरण काल्पनिक है और इसमें बहुत कम जानकारी दी गई है. इसमें, उपयोगकर्ता की विज़िट की गई साइटों से जुड़े विषयों के साथ-साथ, हर साइट पर मौजूद एपीआई कॉलर (वे इकाइयां जो साइट पर मौजूद JavaScript कोड में document.browsingTopics()
को कॉल करती हैं) की जानकारी दी गई है.
साइट | विषय | साइट पर एपीआई कॉल करने वाले |
---|---|---|
running.example | Running & Walking Athletic Shoes |
adtech1.example adtech2.example |
dogs.example | Dogs |
adtech1.example |
holiday.example | Hotels & Accommodations |
adtech2.example |
sunglasses.example | Sunglasses |
[none] |
किसी खास समयावधि (डिफ़ॉल्ट रूप से एक हफ़्ता) के आखिर में, Topics API उस हफ़्ते के लिए ब्राउज़र के सबसे ज़्यादा लोकप्रिय विषयों की जानकारी जनरेट करता है.
- adtech1.example को अब
Running & Walking
,Athletic Shoes
, औरDogs
विषय मिल सकते हैं, क्योंकि उसने running.example और dogs.example पर इन विषयों को देखा है. - adtech1.example, इस उपयोगकर्ता के लिए
Hotels & Accommodations
विषय नहीं दिखा सकता, क्योंकि वह उस विषय से जुड़ी उन साइटों पर मौजूद नहीं है जिन पर उपयोगकर्ता ने हाल ही में विज़िट किया है. - adtech2.example को
Running & Walking
,Athletic Shoes
, औरHotels & Accommodations
विषय दिखे हैं, लेकिनDogs
विषय नहीं दिखे हैं.
उपयोगकर्ता ने sunglasses.example पर विज़िट किया, जिस पर Sunglasses
विषय है. हालांकि, उस साइट पर Topics API को कोई कॉल नहीं किया गया. इसका मतलब है कि एपीआई किसी भी कॉलर के लिए Sunglasses
विषय नहीं दिखाएगा.
दूसरे हफ़्ते में, उपयोगकर्ता किसी दूसरी साइट पर जाता है:
साइट | विषय | साइट पर एपीआई कॉल करने वाले |
---|---|---|
cameras.example | Camera & Photo Equipment |
adtech2.example |
इसके अलावा, adtech2.example का कोड sunglasses.example
में जोड़ा जाता है:
साइट | विषय | साइट पर एपीआई कॉल करने वाले |
---|---|---|
sunglasses.example | Sunglasses |
adtech2.example |
इसका मतलब है कि adtech2.example को अब पहले हफ़्ते के Running & Walking
, Athletic Shoes
, और Hotels & Accommodations
के साथ-साथ Camera & Photo Equipment
और Sunglasses
विषय भी मिलेंगे. हालांकि, ये विषय उसे तीसरे हफ़्ते तक नहीं मिलेंगे. इससे यह पक्का होता है कि तीसरे पक्ष, कुकी की तुलना में उपयोगकर्ता के अतीत (इस मामले में, फ़ैशन में दिलचस्पी) के बारे में ज़्यादा नहीं जान सकते.
अगर उपयोगकर्ता उन विषयों से जुड़ी किसी भी साइट पर नहीं जाता है जिनमें adtech2.example का कोड शामिल है, तो दो हफ़्ते बाद Running & Walking
, Athletic Shoes
, और Hotels & Accommodations
, ज़रूरी शर्तें पूरी करने वाले विषयों की adtech2.example की सूची से हट सकते हैं.

डेटा की कैटगरी तय करने वाला मॉडल
Topics, क्लासिफ़ायर मॉडल का इस्तेमाल करता है. यह मॉडल, वेबसाइट के होस्टनेम को शून्य या एक से ज़्यादा विषयों से मैप करता है. पूरे यूआरएल या पेज के कॉन्टेंट जैसी अन्य जानकारी का विश्लेषण करने से, ज़्यादा काम के विज्ञापन दिखाए जा सकते हैं. हालांकि, इससे निजता भी कम हो सकती है.
टैक्सनॉमी
विषयों को टैक्सोनॉमी से चुना जाता है. इन विषयों को Chrome ने चुना है. इसका मकसद यह है कि टैक्सोनॉमी, भरोसेमंद नेटवर्क के योगदान देने वालों के बनाए संसाधन बन जाए. टैक्सोनॉमी का साइज़ इतना छोटा होना चाहिए कि कई उपयोगकर्ताओं के ब्राउज़र हर विषय से जुड़े हों. हमारा मकसद है कि टैक्सोनॉमी, किसी बाहरी पार्टी से उपलब्ध कराई जाए. इस पार्टी में, पूरे इंडस्ट्री के सुझाव और राय शामिल होनी चाहिए.
संवेदनशील कैटगरी से बचने के लिए, विषयों को सार्वजनिक होना चाहिए. साथ ही, उन्हें मैन्युअल तरीके से चुना जाना चाहिए और अप-टू-डेट रखना चाहिए. Chrome में इस्तेमाल की जाने वाली टैक्सोनॉमी को मनुष्य ने बनाया है, ताकि आम तौर पर संवेदनशील मानी जाने वाली कैटगरी को शामिल न किया जा सके. जैसे, नस्ल या यौन रुझान.
विषयों की कैटगरी
सबसे लोकप्रिय 50,000 साइटों के लिए, विषयों को मैन्युअल तरीके से चुना जाता है. साथ ही, होस्टनेम और विषयों की इस चुनी गई सूची का इस्तेमाल, क्लासिफ़ायर मॉडल को ट्रेन करने के लिए किया जाता है. टॉप साइटों के लिए, विषयों को क्लासिफ़ायर मॉडल का इस्तेमाल करने के बजाय, बदलाव करने की सूची से ऐक्सेस किया जाता है. ओवरराइड की सूची को अपने कंप्यूटर पर देखा जा सकता है.

chrome://topics-internals
पेज के 'डेटा की कैटगरी तय करने वाला' पैनल में, मॉडल का वर्शन, उसका पाथ, और सूची में शामिल हर होस्ट से जुड़े विषयों की जानकारी होती है.Chrome में Topics API लागू करने पर, मॉडल की जानकारी देने वाली TensorFlow Lite फ़ाइल डाउनलोड की जाती है, ताकि उसका इस्तेमाल उपयोगकर्ता के डिवाइस पर किया जा सके.
उपयोगकर्ता के सबसे ज़्यादा ब्राउज़ किए गए पांच विषयों को चुनने का तरीका
एपीआई, हर एपच के लिए एक विषय दिखाता है. हालांकि, ज़्यादा से ज़्यादा तीन विषय दिखाए जा सकते हैं. अगर तीन वैल्यू दिखती हैं, तो इसमें मौजूदा और पिछले दो एपर्च्यूज़ के विषय शामिल होते हैं.
- हर युग के आखिर में, ब्राउज़र उन पेजों की सूची बनाता है जो इन शर्तों को पूरा करते हैं:
- उपयोगकर्ता ने उस पेज पर, 'एपॉच' के दौरान विज़िट किया था.
- पेज में ऐसा कोड शामिल है जो
document.browsingTopics()
को कॉल करता है. - एपीआई चालू था (उदाहरण के लिए, उपयोगकर्ता या रिस्पॉन्स हेडर ने उसे ब्लॉक नहीं किया था).
- उपयोगकर्ता के डिवाइस पर ब्राउज़र, Topics API से मिले क्लासिफ़ायर मॉडल का इस्तेमाल करता है. इससे, हर पेज के होस्टनेम को विषयों की सूची से मैप किया जाता है.
ब्राउज़र, सबसे ज़्यादा खोजे गए पांच विषयों की सूची जनरेट करता है.
- विज्ञापन नेटवर्क से मिले सुझावों के आधार पर, टैक्सोनॉमी के हर रूट विषय को "ज़्यादा उपयोगिता" या "स्टैंडर्ड उपयोगिता" बकेट में से किसी एक में असाइन किया जाता है. ब्राउज़र, विषयों को पहले उनके बकेट असाइनमेंट के हिसाब से क्रम में लगाता है. सभी डेसेंटेंट टॉपिक, अपने पैरंट रूट टॉपिक का बकेट असाइनमेंट इनहेरिट करते हैं. "ज़्यादा काम के" विषयों को प्राथमिकता दी जाती है.
- इसके बाद, ब्राउज़र हर बकेट में विषयों को फ़्रीक्वेंसी के हिसाब से क्रम में लगाता है.
- क्रम से लगाई गई इस सूची में से, उपयोगकर्ता के उस समयावधि के लिए सबसे ज़्यादा ब्राउज़ किए गए पांच विषय चुने जाते हैं.
इसके बाद, document.browsingTopics()
तरीका हर युग के लिए, सबसे ज़्यादा ब्राउज़ किए गए पांच विषयों में से कोई एक विषय चुनता है. साथ ही, इस बात की 5% संभावना होती है कि इनमें से कोई भी विषय, विषयों के पूरे टैक्सोनॉमी से किसी भी क्रम में चुना जा सकता है. Chrome में, उपयोगकर्ता अलग-अलग विषयों को हटा सकते हैं या अपना ब्राउज़िंग इतिहास मिटा सकते हैं. इससे, एपीआई से मिलने वाले विषयों की संख्या कम हो जाती है. उपयोगकर्ता, एपीआई से ऑप्ट आउट भी कर सकते हैं.
chrome://topics-internals
पेज पर जाकर, मौजूदा समयावधि के दौरान देखे गए विषयों के बारे में जानकारी देखी जा सकती है.
आगे क्या करना होगा
सेटअप करना
विषय लागू करना
इन्हें भी देखें
वेब पर Topics API को बेहतर तरीके से समझने के लिए, हमारे संसाधन देखें.
- Topics में डेमो, कोलैब, और सिलसिलेवार तरीके से निर्देश देने वाले वीडियो देखें.
- Chrome फ़्लैग की सूची देखें. इससे डेवलपर, टेस्टिंग के लिए Topics API को पसंद के मुताबिक बना सकते हैं.
- देखें कि उपयोगकर्ता और डेवलपर, एपीआई को कैसे कंट्रोल कर सकते हैं.
- तकनीकी जानकारी और सहायता के लिए संसाधन देखें. सवाल पूछें, उनसे जुड़ें और सुझाव शेयर करें.