ওয়েবের জন্য বিষয় API

বিষয় 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 app cats.
  • 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.
  • 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 or Sports/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 topic Sports/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.
Diagram showing tat the Topics API only marks the topics as observed if the callers has presence in the context.
The Topics API marks the topics observed only by the callers that have presence in the context of these topics. The callers will only be able to access the topics they have observed.

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 ওয়েবসাইটের জন্য অনুমান করা বিষয় হতে পারে /Pets & Animals/Pets/Dogs

নিম্নলিখিত চিত্রটি একটি সরলীকৃত উদাহরণ দেখায় তা দেখানোর জন্য যে বিষয় API কীভাবে একটি বিজ্ঞাপন প্রযুক্তি প্ল্যাটফর্মকে একটি উপযুক্ত বিজ্ঞাপন নির্বাচন করতে সাহায্য করতে পারে৷ উদাহরণটি অনুমান করে যে ব্যবহারকারীর ব্রাউজারে ইতিমধ্যেই বিষয়গুলিতে ওয়েবসাইট হোস্টনাম ম্যাপ করার জন্য একটি মডেল রয়েছে৷

ডায়াগ্রামে টপিকস এপিআই লাইফসাইকেলের পর্যায়গুলি দেখানো হচ্ছে, ব্যবহারকারী ওয়েবসাইট পরিদর্শন করা থেকে শুরু করে বিজ্ঞাপন দেখানো পর্যন্ত।
টপিকস এপিআই লাইফসাইকেল ডায়াগ্রাম উচ্চ-স্তরের দৃষ্টিকোণ থেকে এপিআই অ্যাকশনের পর্যায়গুলির মধ্য দিয়ে চলে।

ব্রাউজারটি টপিকস এপিআই কল করে এমন কোডের প্রেক্ষাপট থেকে কলারের উত্স নির্ধারণ করে। বাস্তবে, এর মানে হল যে টপিক ব্যবহারকারীরা তাদের মূল থেকে একটি আইফ্রেমে API কল করে অথবা তারা তাদের মূলে নিয়ে আসা বিষয়গুলি অন্তর্ভুক্ত করে।

উদাহরণস্বরূপ, একটি সাপ্লাই-সাইড প্ল্যাটফর্ম (SSP) একাধিক প্রকাশকের সাইটে এম্বেড করা যেতে পারে। এসএসপি তখন তার মূল থেকে একটি আইফ্রেমের মধ্যে বিষয় API কল করতে পারে, এটি সেই প্রকাশকের সাইটগুলিতে ব্যবহারকারীর সাথে সম্পর্কিত বিষয়গুলি পর্যবেক্ষণ করার অনুমতি দেয়। ব্যবহারকারীর জন্য একটি প্রাসঙ্গিক বিজ্ঞাপন নির্বাচন করতে সাহায্য করার জন্য এই বিষয়গুলি একটি ডিমান্ড-সাইড প্ল্যাটফর্মের (DSP) সাথে ভাগ করা যেতে পারে।

এপিআই কীভাবে সিদ্ধান্ত নেয় কোন কলকারীরা কোন বিষয়গুলি দেখবে

API কলকারীরা শুধুমাত্র সেই বিষয়গুলি গ্রহণ করে যা তারা সম্প্রতি পর্যবেক্ষণ করেছে, এবং ব্যবহারকারীর জন্য বিষয়গুলি প্রতিটি যুগে একবার রিফ্রেশ করা হয়: একটি সময়কাল, Chrome এর বাস্তবায়নে এক সপ্তাহে সেট করা হয়৷ তার মানে API একটি রোলিং উইন্ডো প্রদান করে যেখানে একজন প্রদত্ত কলকারী পর্যবেক্ষণ করা বিষয়গুলি পেতে পারে।

নিম্নলিখিত সারণীটি একটি একক যুগের সময় একজন ব্যবহারকারীর জন্য একটি অনুমানমূলক ব্রাউজিং ইতিহাসের একটি উদাহরণ (যদিও অবাস্তবভাবে ছোট) রূপরেখা দেয়, তারা যে সাইটগুলি পরিদর্শন করেছে তার সাথে সম্পর্কিত বিষয়গুলি এবং প্রতিটি সাইটে উপস্থিত API কলকারীরা (যে সংস্থাগুলি document.browsingTopics() জাভাস্ক্রিপ্ট কোডে document.browsingTopics() সাইটে অন্তর্ভুক্ত)।

সাইট বিষয় সাইটে API কলার
run.example Running & Walking
Athletic Shoes
adtech1.example
adtech2.example
dogs.example Dogs adtech1.example
ছুটির উদাহরণ Hotels & Accommodations adtech2.example
sunglasses.example Sunglasses [কোনটিই নয়]

যুগের শেষে (ডিফল্টভাবে এক সপ্তাহ) টপিক এপিআই সপ্তাহের জন্য ব্রাউজারের শীর্ষ বিষয়গুলি তৈরি করে।

  • adtech1.example এখন Running & Walking , Athletic Shoes এবং Dogs বিষয়গুলি পাওয়ার যোগ্য, কারণ এটি রানিং.উদাহরণ এবং dogs.example-এও তাদের পর্যবেক্ষণ করেছে৷
  • adtech1.example এই ব্যবহারকারীর জন্য Hotels & Accommodations বিষয় পাওয়ার যোগ্য নয় কারণ এটি সেই বিষয়ের সাথে যুক্ত ব্যবহারকারী সম্প্রতি পরিদর্শন করা কোনো সাইটে উপস্থিত নয়।
  • adtech2.example Running & Walking , Athletic Shoes এবং Hotels & Accommodations বিষয়গুলি দেখেছে, কিন্তু Dogs বিষয় দেখেনি৷

ব্যবহারকারী sunglasses.example পরিদর্শন করেছেন, যার Sunglasses বিষয় রয়েছে, কিন্তু সেই সাইটে টপিক এপিআই-তে কোনো কল নেই। এই মুহুর্তে, এর অর্থ হল Sunglasses বিষয়টি API দ্বারা কোনো কলারের জন্য ফেরত দেওয়া হবে না।

দুই সপ্তাহে, ব্যবহারকারী অন্য সাইটে যান:

সাইট বিষয় সাইটে API কলার
cameras.example Camera & Photo Equipment adtech2.example

উপরন্তু, adtech2.example থেকে কোড sunglasses.example এ যোগ করা হয়েছে:

সাইট বিষয় সাইটে API কলার
sunglasses.example Sunglasses adtech2.example

পাশাপাশি Running & Walking , Athletic Shoes এবং Hotels & Accommodations 1 সপ্তাহ থেকে, এর অর্থ হল adtech2.example এখন Camera & Photo Equipment এবং Sunglasses বিষয়গুলি পেতে সক্ষম হবে — তবে পরবর্তী যুগ, সপ্তাহ 3 পর্যন্ত নয়। এটি নিশ্চিত করে যে তৃতীয় পক্ষগুলি ব্যবহারকারীর অতীত সম্পর্কে (এই ক্ষেত্রে, ফ্যাশনের প্রতি আগ্রহ) কুকিগুলির চেয়ে বেশি শিখতে পারে না৷

আরও দুই সপ্তাহ পরে, Running & Walking , Athletic Shoes এবং Hotels & Accommodations adtech2.example-এর যোগ্য বিষয়গুলির তালিকা থেকে বাদ পড়তে পারে যদি ব্যবহারকারী adtech2.example-এর কোড অন্তর্ভুক্ত করে এমন বিষয়গুলির সাথে কোনও সাইট পরিদর্শন না করেন৷

ব্যবহারকারীরা API ব্যবহার করে এমন সাইটগুলি পরিদর্শন করার সময় বিষয় API-এর পদক্ষেপগুলি।
API কীভাবে বিষয়গুলি পর্যবেক্ষণ করে এবং অ্যাক্সেস করে।

ক্লাসিফায়ার মডেল

বিষয়গুলি একটি ক্লাসিফায়ার মডেল ব্যবহার করে যা ওয়েবসাইটের হোস্টনামগুলিকে শূন্য বা তার বেশি বিষয়ে ম্যাপ করে (অতিরিক্ত তথ্য বিশ্লেষণ করা, যেমন সম্পূর্ণ URL বা পৃষ্ঠার বিষয়বস্তু, আরও প্রাসঙ্গিক বিজ্ঞাপনের জন্য অনুমতি দিতে পারে, তবে গোপনীয়তাও হ্রাস করতে পারে)।

শ্রেণীবিন্যাস

একটি শ্রেণীবিন্যাস থেকে বিষয় নির্বাচন করা হয়. এই বিষয়গুলি Chrome দ্বারা কিউরেট করা হয়েছে, এই লক্ষ্যে যে শ্রেণীবিন্যাস বিশ্বস্ত ইকোসিস্টেম অবদানকারীদের দ্বারা রক্ষণাবেক্ষণ করা একটি সংস্থান হয়ে ওঠে৷ শ্রেণীবিন্যাস যথেষ্ট ছোট হতে হবে যাতে অনেক ব্যবহারকারীর ব্রাউজার প্রতিটি বিষয়ের সাথে যুক্ত হবে। চূড়ান্ত লক্ষ্য হল শ্রেণীবিন্যাস একটি বাহ্যিক পক্ষ থেকে উৎসারিত করা যা শিল্প জুড়ে প্রতিক্রিয়া এবং ধারণাগুলিকে অন্তর্ভুক্ত করে।

সংবেদনশীল বিভাগগুলি এড়াতে, বিষয়গুলি অবশ্যই সর্বজনীন, মানব-নিয়োজিত এবং আপ টু ডেট থাকতে হবে৷ ক্রোম দ্বারা ব্যবহৃত শ্রেণীবিন্যাসটি সাধারণত সংবেদনশীল হিসাবে বিবেচিত বিভাগগুলি বাদ দেওয়ার জন্য মানব-নিয়োজিত করা হয়েছে, যেমন জাতিগততা বা যৌন অভিযোজন।

বিষয় শ্রেণীবিভাগ

50,000টি শীর্ষ সাইটের জন্য বিষয়গুলি ম্যানুয়ালি কিউরেট করা হয় এবং হোস্টনাম এবং বিষয়গুলির এই কিউরেটেড ওভাররাইড তালিকাটি ক্লাসিফায়ার মডেলকে প্রশিক্ষণ দিতে ব্যবহৃত হয়। শীর্ষস্থানীয় সাইটগুলির জন্য, ক্লাসিফায়ার মডেল ব্যবহার করার পরিবর্তে ওভাররাইড তালিকা থেকে বিষয়গুলি অ্যাক্সেস করা হয়। আপনি আপনার কম্পিউটারে স্থানীয়ভাবে ওভাররাইড তালিকা দেখতে পারেন।

ক্লাসিফায়ার প্যানেল সহ chrome://topics-internals পৃষ্ঠা নির্বাচিত৷
chrome://topics-internals পৃষ্ঠা ক্লাসিফায়ার প্যানেল মডেল সংস্করণ, এর পথ এবং তালিকাভুক্ত প্রতিটি হোস্টের সাথে সম্পর্কিত বিষয়গুলিকে তালিকাভুক্ত করে৷

Chrome-এর টপিক API-এর বাস্তবায়ন মডেলের প্রতিনিধিত্বকারী একটি TensorFlow Lite ফাইল ডাউনলোড করে যাতে এটি ব্যবহারকারীর ডিভাইসে স্থানীয়ভাবে ব্যবহার করা যায়।

কিভাবে ব্যবহারকারীর সেরা পাঁচটি বিষয় নির্বাচন করা হয়

API প্রতিটি যুগের জন্য একটি বিষয় প্রদান করে, সর্বোচ্চ তিনটি পর্যন্ত। যদি তিনটি প্রত্যাবর্তন করা হয়, এতে বর্তমান যুগ এবং পূর্ববর্তী দুটি বিষয় অন্তর্ভুক্ত রয়েছে।

  1. প্রতিটি যুগের শেষে, ব্রাউজার নিম্নলিখিত মানদণ্ড পূরণ করে এমন পৃষ্ঠাগুলির একটি তালিকা সংকলন করে:
    • পৃষ্ঠাটি যুগের সময় ব্যবহারকারী দ্বারা পরিদর্শন করা হয়েছিল।
    • পৃষ্ঠায় কোড রয়েছে যা document.browsingTopics() কে কল করে।
    • এপিআই সক্ষম করা হয়েছে (উদাহরণস্বরূপ, ব্যবহারকারী বা প্রতিক্রিয়া শিরোনাম দ্বারা অবরুদ্ধ নয়)।
  2. ব্রাউজার, ব্যবহারকারীর ডিভাইসে, বিষয়গুলির একটি তালিকায় প্রতিটি পৃষ্ঠার হোস্টনাম ম্যাপ করতে বিষয় API দ্বারা প্রদত্ত ক্লাসিফায়ার মডেল ব্যবহার করে৷
  3. ব্রাউজারটি শীর্ষ পাঁচটি বিষয়ের একটি তালিকা তৈরি করে।

    • শ্রেণীবিন্যাসে 22টি মূল বিষয়গুলির প্রত্যেকটিকে বিজ্ঞাপন বাস্তুতন্ত্রের প্রতিক্রিয়ার উপর ভিত্তি করে একটি "উচ্চ উপযোগিতা" বা "স্ট্যান্ডার্ড ইউটিলিটি" বালতিতে বরাদ্দ করা হয়। ব্রাউজার প্রথমে তাদের বালতি অ্যাসাইনমেন্ট দ্বারা বিষয় বাছাই করে। সমস্ত বংশধর বিষয়গুলি তাদের মূল মূল বিষয়ের বাকেট অ্যাসাইনমেন্টের উত্তরাধিকারী হয়৷ "উচ্চ উপযোগিতা" বিষয়গুলিকে অগ্রাধিকার দেওয়া হয়৷
    • ব্রাউজার তারপর প্রতিটি বালতির মধ্যে ফ্রিকোয়েন্সি দ্বারা বিষয় বাছাই.
    • এই বাছাই করা তালিকা থেকে শীর্ষ পাঁচটি বিষয়কে সেই যুগের জন্য ব্যবহারকারীর শীর্ষ বিষয় হিসাবে নির্বাচিত করা হয়েছে।

তারপর document.browsingTopics() পদ্ধতিটি প্রতিটি যুগের জন্য শীর্ষ পাঁচটি থেকে একটি এলোমেলো বিষয় ফেরত দেয়, 5% সম্ভাবনা থাকে যে এইগুলির যেকোনও বিষয়ের সম্পূর্ণ শ্রেণীবিন্যাস থেকে এলোমেলোভাবে নির্বাচিত হতে পারে। ক্রোমে, ব্যবহারকারীরা পৃথক বিষয়গুলি সরাতে বা API দ্বারা প্রত্যাবর্তিত বিষয়গুলির সংখ্যা কমাতে তাদের ব্রাউজিং ইতিহাস সাফ করতেও সক্ষম। ব্যবহারকারীরা API থেকে অপ্ট আউটও করতে পারেন।

আপনি chrome://topics-internals পৃষ্ঠা থেকে বর্তমান যুগে পর্যবেক্ষণ করা বিষয় সম্পর্কে তথ্য দেখতে পারেন।

Next steps

Get your environment ready to test and develop web applications with the Topics API.
Check out implementation details and code samples for callers to observe and access topics.

এছাড়াও দেখুন

ওয়েবে টপিক এপিআই আরও ভালভাবে বুঝতে আমাদের সংস্থানগুলি দেখুন।