Web için Topics API

Topics API, üçüncü taraf çerezleri kullanmadan ilgi alanına dayalı reklamcılığı etkinleştirir.

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 that 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.

Web'deki konularla ilgili uygulama örnekleri

Web'de konular, kullanıcının ziyaret ettiği sayfaların ana makine adlarından çıkarılır. Örneğin, dogs.example web sitesi için tahmin edilen konu /Evcil ve Yabani Hayvanlar/Evcil Hayvanlar/Köpekler olabilir.

Aşağıdaki şemada, Topics API'nin bir reklam teknolojisi platformunun uygun bir reklam seçmesine nasıl yardımcı olabileceğini gösteren basitleştirilmiş bir örnek gösterilmektedir. Örnekte, kullanıcının tarayıcısında web sitesi ana makine adlarını konularla eşleyen bir modelin bulunduğu varsayılmıştır.

Web sitelerini ziyaret eden bir kullanıcıdan reklamın gösterilmesine kadar Topics API yaşam döngüsündeki aşamaları gösteren şema.
Topics API yaşam döngüsü şeması, API işlemlerinin aşamalarını üst düzey bir bakış açısıyla gösterir.

Tarayıcı, Topics API'yi çağıran kodun bağlamından arayan kişinin kaynağını belirler. Pratikte bu, Topics kullanıcılarının API'yi kaynaklarından bir iFrame içinde çağırması veya konuları kaynaklarına bir get işlevine dahil etmesi anlamına gelir.

Örneğin, bir arz tarafı platformu (SSP) birden fazla yayıncının sitesine yerleştirilebilir. Ardından SSP, kaynağından bir iFrame içinde Topics API'yi çağırabilir. Bu sayede, söz konusu yayıncının sitelerinde bir kullanıcıyla ilişkili konuları gözlemleyebilir. Bu konular daha sonra kullanıcıyla alakalı reklam seçmesine yardımcı olmak için bir talep tarafı platformuyla (TTP) paylaşılabilir.

API, hangi arayanların hangi konuları göreceğine nasıl karar verir?

API çağırıcıları yalnızca yakın zamanda gözlemledikleri konuları alır ve bir kullanıcının konuları her dönemde bir kez yenilenir. Dönem, Chrome'un uygulamasında bir hafta olarak belirlenmiştir. Yani API, belirli bir arayanın gözlemlenen konuları alabileceği bir kaydırmalı pencere sağlar.

Aşağıdaki tabloda, tek bir dönem boyunca bir kullanıcının varsayımsal tarama geçmişi örneği (gerçeğe uygun olmayan küçüklükte olsa da) özetlenmiştir. Bu örnekte, ziyaret edilen sitelerle ilişkili konular ve her sitede bulunan API çağırıcıları (siteye dahil edilen JavaScript kodunda document.browsingTopics()'yi çağıran varlıklar) gösterilmektedir.

Site Konular Sitedeki API çağıranlar
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, dönemin sonunda (varsayılan olarak bir hafta) tarayıcının haftanın en popüler konularını oluşturur.

  • adtech1.example, running.example ve dogs.example'da gözlemlediği için artık Running & Walking, Athletic Shoes ve Dogs konularını almaya uygundur.
  • adtech1.example, kullanıcının yakın zamanda ziyaret ettiği ve bu konuyla ilişkili sitelerde bulunmadığı için bu kullanıcı için Hotels & Accommodations konusunu almaya uygun değildir.
  • adtech2.example, Running & Walking, Athletic Shoes ve Hotels & Accommodations konularını görmüştür ancak Dogs konusunu görmemiştir.

Kullanıcı, Sunglasses konusuna sahip sunglasses.example adresini ziyaret etti ancak bu sitede Topics API'ye çağrı gönderilmedi. Bu noktada, Sunglasses konusunun API tarafından herhangi bir arayan için döndürülmeyeceği anlamına gelir.

İkinci haftada kullanıcı başka bir siteyi ziyaret eder:

Site Konular Sitedeki API çağıranlar
cameras.example Camera & Photo Equipment adtech2.example

Ayrıca, adtech2.example adresindeki kod sunglasses.example adresine eklenir:

Site Konular Sitedeki API çağıranlar
sunglasses.example Sunglasses adtech2.example

Bu, adtech2.example'in 1. haftadan itibaren Running & Walking, Athletic Shoes ve Hotels & Accommodations konularının yanı sıra Camera & Photo Equipment ve Sunglasses konularını da alabileceği anlamına gelir. Ancak bu, sonraki döneme (3. hafta) kadar geçerli değildir. Bu sayede üçüncü taraflar, kullanıcının geçmişi (bu durumda modaya olan ilgisi) hakkında çerezlerle elde edebileceklerinden daha fazla bilgi edinemez.

Kullanıcı, adtech2.example'dan kod içeren bu konulara sahip siteleri ziyaret etmezse Running & Walking, Athletic Shoes ve Hotels & Accommodations, iki hafta sonra adtech2.example'in uygun konular listesinden çıkarılabilir.

Kullanıcılar API'yi kullanan siteleri ziyaret ederken Topics API'nin uyguladığı adımlar.
API'nin konuları nasıl gözlemlediği ve bunlara nasıl eriştiği.

Sınıflandırıcı modeli

Topics, web sitesi ana makine adlarını sıfır veya daha fazla konuyla eşleyen bir sınıflandırıcı modeli kullanır (tam URL'ler veya sayfa içeriği gibi ek bilgilerin analiz edilmesi, daha alakalı reklamlar sunabilir ancak gizliliği de azaltabilir).

Sınıflandırma

Topics, bir sınıflandırmadan seçilir. Bu konular, sınıflandırmanın güvenilir ekosistem katkıda bulunanları tarafından yönetilen bir kaynak haline gelmesi amacıyla Chrome tarafından seçilmiştir. Sınıflandırma, birçok kullanıcının tarayıcısının her konuyla ilişkilendirileceği kadar küçük olmalıdır. Sınıflandırmanın, sektördeki geri bildirimleri ve fikirleri dahil eden harici bir kaynaktan alınması nihai hedeftir.

Hassas kategorilerden kaçınmak için konuların herkese açık, gerçek kişiler tarafından seçilmiş ve güncel olması gerekir. Chrome tarafından kullanılan sınıflandırma, genellikle hassas kabul edilen kategorileri (ör. etnik köken veya cinsel yönelim) hariç tutmak için gerçek kişiler tarafından seçilmiştir.

Konu sınıflandırması

Konular,en iyi 50.000 site için manuel olarak seçilir. Sınıflandırıcı modelini eğitmek için, ana makine adları ve konuların yer aldığı bu özelleştirilmiş geçersiz kılma listesi kullanılır. En popüler sitelerde, sınıflandırıcı modeli kullanılmak yerine konular için geçersiz kılma listesinden erişilir. Yedekleme listesini bilgisayarınızda yerel olarak görüntüleyebilirsiniz.

Sınıflandırıcı panelinin seçili olduğu chrome://topics-internals sayfası.
chrome://topics-internals sayfası Sınıflandırıcı panelinde model sürümü, yolu ve listelenen her ana makineyle ilişkili konular listelenir.

Chrome'un Topics API uygulaması, modeli temsil eden bir TensorFlow Lite dosyası indirerek kullanıcının cihazında yerel olarak kullanılmasını sağlar.

Kullanıcının en çok ilgi gösterdiği beş konu nasıl seçilir?

API, her dönem için en fazla üç tane olmak üzere bir konu döndürür. Üç değer döndürülürse bu, geçerli dönem ve önceki iki döneme ait konuları içerir.

  1. Tarayıcı, her dönemin sonunda aşağıdaki ölçütleri karşılayan sayfaların bir listesini oluşturur:
    • Sayfa, kullanıcı tarafından dönem boyunca ziyaret edildi.
    • Sayfa, document.browsingTopics()'ü çağıran kod içeriyor.
    • API etkinleştirilmiştir (örneğin, kullanıcı veya yanıt başlığı tarafından engellenmemiş olmalıdır).
  2. Kullanıcının cihazındaki tarayıcı, her sayfanın barındırıcı adını bir konu listesiyle eşlemek için Topics API tarafından sağlanan sınıflandırıcı modelini kullanır.
  3. Tarayıcı, en çok görüntülenen beş konunun listesini oluşturur.

    • Sınıflandırma'daki 22 kök konunun her biri, reklamcılık ekosisteminden gelen geri bildirime göre "yüksek faydalı" veya "standart faydalı" gruplara atanır. Tarayıcı, konuları önce grup atamasına göre sıralar. Tüm alt konular, üst kök konularının paket atamasını devralır. "Yüksek faydalı" konulara öncelik verilir.
    • Tarayıcı daha sonra konuları her bir gruptaki sıklığa göre sıralar.
    • Bu sıralanmış listedeki ilk beş konu, kullanıcının söz konusu dönemde en çok ilgi gösterdiği konular olarak seçilir.

Ardından document.browsingTopics() yöntemi, her dönem için ilk beşten rastgele bir konu döndürür. Bu konulardan herhangi birinin, konu sınıflandırmasının tamamından rastgele seçilme olasılığı% 5'tir. Chrome'da kullanıcılar, API tarafından döndürülen konu sayısını azaltmak için konuları tek tek kaldırabilir veya tarama geçmişlerini temizleyebilir. Kullanıcılar API'yi devre dışı bırakabilir.

Mevcut dönem boyunca gözlemlenen konularla ilgili bilgileri chrome://topics-internals sayfasından görüntüleyebilirsiniz.

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.

See also

Check out our resources to better understand the Topics API on the Web.