Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert on attempt to use Topics API #2762

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ potential
[encoding-related security issue](https://code.google.com/archive/p/doctype-mirror/wikis/ArticleUtf7.wiki)
in Internet Explorer.

### document.browsingTopics alert

In some cases, a third-party script can collect browsing interest information about users
using new experimental functionality called Topics API. The first script in the page header
will alert you if a script is attempting to do this. The line can be removed if your site
is turning off Topics API with a Permissions-Policy, running without third-party scripts,
or if you are using Topics API.

The line can be changed to send an analytics event to check if third-party scripts begin trying
to use Topics API in production.

For more information, see [Google's Topics API: Rebranding FLoC Without Addressing Key
Privacy Issues](https://brave.com/web-standards-at-brave/7-googles-topics-api/)

### Meta Description

The `description` meta tag provides a short description of the page. In some
Expand Down
1 change: 1 addition & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<head>
<meta charset="utf-8">
<script>document.browsingTopics=()=>{alert('Topics API called: check third-party scripts.')}</script>
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down