Topics API demo
This site provides a basic demo of the Topics API.
An iframe with src=https://topics-demo.glitch.me/observe/index.html
calls document.browsingTopics()
.
This iframe is embedded on several sites, to observe topics:
- topics-demo-cats.glitch.me
- cats-cats-cats-cats.glitch.me
- topics-demo-dogs.glitch.me
- topics-demo-birds.glitch.me
Try out the demo
-
Run Chrome Beta 101 from the command line using the following feature flags:
--enable-features=BrowsingTopics:time_period_per_epoch/15s,PrivacySandboxAdsAPIsOverride,PrivacySandboxSettings3,OverridePrivacySandboxSettingsLocalTesting
Make sure that chrome://flags/#privacy-sandbox-ads-apis is disabled, since the defaults from this will override the command-line flags (in particular, the epoch duration).
- Open this page.
- Visit each of the sites listed above — it may be easier to use separate tabs for this.
- The most popular topics observed for the most recent three epochs will be displayed below, refreshed every second. The epoch length is set to 15 seconds using the flags above (the default length is one week).
If no topics are displayed, navigate repeatedly to the pages listed above.
The list of topics is only updated if there is a change in observed topics.
You may see unexpected results. Topics inference is not deterministic, and there is a 5% chance that a random topic is returned for each epoch.
No topics observed yet: try visiting one of the sites above.
Notes
- Pages you visit will not affect the topics shown here unless they include the iframe used in this demo.
- Don't be surprised if the number of topics returned goes down if you haven't recently visited one of the sites listed above. A maximum of one observed topic is returned for each of the last three epochs, and the epoch length is set to 15 seconds using the flags above (the default is one week).
- Topics are inferred from hostname — the explainer details how topics are returned.
- Topics are returned in random order.