# Topics Integration Guide for SSPs

As part of [Privacy Sandbox](https://privacysandbox.com/intl/en_us/), Chrome
proposed a [Topics
API](https://developer.chrome.com/en/docs/privacy-sandbox/topics/). The Topics
API provides third-party callers on the web page (including ad tech providers)
with [coarse-grained advertising
topics](https://github.com/patcg-individual-drafts/topics/blob/main/taxonomy_v2.md)
that the page visitor might be interested in. These Topics can
supplement the contextual information about the current page.

Display \& Video 360 and Google Ads have found Topics to be a valuable signal in
combination with other signals in delivering interest based advertising, without
relying on third-party cookies. [Learn more](https://blog.google/products/ads-commerce/iba-test-results/)
about Display \& Video 360 and Google Ads approach to interest based advertising.
Google encourages SSPs to include Topics in their requests to help increase
the relevance of your publisher inventory.

The following guide provides the steps necessary for SSPs to integrate with
Topics and to test these with Display \& Video 360 and Google Ads or any other
participating ad tech provider.

## General Information

Before diving into the Topics API, first familiarize yourself
with the [Topics developer guide](https://developer.chrome.com/docs/privacy-sandbox/topics/) from Chrome.
Starting in October 2023, Chrome requires callers of the Privacy Sandbox APis, including Topics, to be [enrolled](https://developer.chrome.com/blog/announce-enrollment-privacy-sandbox/).
For more information and latest updates, we recommend checking out [Chrome's Topic API Status page](https://developer.chrome.com/docs/privacy-sandbox/status/#topics-api)
\& [Topics API latest updates](https://developer.chrome.com/docs/privacy-sandbox/topics/latest/).

## Methods of Accessing Topics

Here is a summary of the most common methods of accessing Topics. If these methods don't work for your configuration, DV360 encourages you to reach out to the Chrome team per the suggested channels outlined in the [Chrome's Topic API Status page](https://developer.chrome.com/docs/privacy-sandbox/status/#topics-api).

### Direct Implementation

SSPs can request Topics on their publisher partner pages using javascript ([documentation](https://developer.chrome.com/docs/privacy-sandbox/topics/#epoch))
or headers ([documentation](https://developer.chrome.com/docs/privacy-sandbox/topics/#use-headers-to-access-and-observe-topics)).

### Using Prebid Module

SSPs that participate in Prebid can reference the
[Prebid Documentation](https://docs.prebid.org/dev-docs/modules/topicsFpdModule.html)
to learn how to receive Topics using
the [topicsFpdModule](https://docs.prebid.org/dev-docs/modules/topicsFpdModule.html).
As publishers need to include this module in their prebid final package,
DV360 encourages you to reach out to your publisher partners to make
sure this requirement is on their radar.

### Using Prebid 8.9.0+

Prebid has released a new feature in the Prebid 8.9.0+ core modules
that enable Topics to be called in outgoing bid requests
\[[release notes](https://github.com/prebid/Prebid.js/releases/tag/8.9.0)\].
[Prebid documentation](https://docs.prebid.org/dev-docs/bidder-adaptor#:%7E:text=topics%20in%20the-,Sec%2DBrowsing%2DTopics,-request%20header%20marked)
outlines how to include the Observe-Browsing-Topics in the server response.
Topics is available in the 'Sec-Browsing-Topics'
[header](https://developer.chrome.com/en/docs/privacy-sandbox/topics/)
of the `fetch()` request.
SSPs may need to transfer the Topics from the header
to the bid request before sending to DV360.
As publishers need to have 8.9.0+ core implemented
for this capability to be available,
make sure your publisher partners are aware.

### Using Open Bidding

SSPs that participate in [Open Bidding](https://support.google.com/admanager/answer/7128453)
can reference the [Authorized Buyer Documentation](https://developers.google.com/authorized-buyers/rtb/topics)
to receive Topics in bid requests from Google using the OpenRTB Protocol.

## Passing Topics to DV360 and Google Ads

The previous section outlined options for accessing Topics.
Once you have accessed Topics you can share Topics in the
bidstream with your DSP buyers. This section outlines
how to pass to DV360 and Google Ads.
DV360 and Google Ads expect Topics to be
in the user.data object in OpenRTBRequest.
[Learn how to pass segment IDs in vendor-specific taxonomies using JSON.](https://github.com/InteractiveAdvertisingBureau/openrtb/blob/master/extensions/community_extensions/segtax.md#enumeration-of-taxonomies)

### Example

Chrome Topics API response, returned by `document.browsingTopics()`:

```javascript
[
  {
    "modelVersion": "classifier_v2",
    "taxonomyVersion": "taxonomy_v2",
    "topic": 351
  },
  {
    "modelVersion": "classifier_v2",
    "taxonomyVersion": "taxonomy_v2",
    "topic": 163
  },
  {
    "modelVersion": "classifier_v2",
    "taxonomyVersion": "taxonomy_v2",
    "topic": 59
  }
]
```

`OpenRTBRequest` JSON:

```javascript
{
  ...
  "user": {
    "data": [
      {
        "ext": {
          "segtax": 601,
          "segclass": "classifier_v1"
        },
        "segment": [
          { "id": "351" },
          { "id": "163" },
          { "id": "59" }
        ]
      }
    ]
  }
}
```

In the preceding example, `taxonomy_version` implies that [the taxonomy_v2
mapping](https://github.com/patcg-individual-drafts/topics/blob/main/taxonomy_v2.md)
is used. Based on the taxonomy, these topic IDs correspond to the following
Topics:

| Topic ID | Topic Value |
|---|---|
| 351 | /Arts \& Entertainment/Comics \& Animation |
| 163 | /Finance/Insurance/Travel Insurance |
| 59 | /Autos \& Vehicles/Classic Vehicles |