Attribution reporting
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
Experimental: これは実験的な機能です。
本番で使用する前にブラウザー互換性一覧表をチェックしてください。
attributionSrc は HTMLAnchorElement インターフェイスのプロパティで、<a> 要素の attributionsrc 属性をプログラムから取得および設定ます。attributionsrc は、ブラウザーに Attribution-Reporting-Eligible ヘッダーを送信するように指定します。サーバー側では、レスポンスで Attribution-Reporting-Register-Source ヘッダーを送信し、ナビゲーションベースの帰属元を登録するために使用されます。
ブラウザーは、ナビゲーションレスポンスを受信すると、ナビゲーションベースの帰属ソース(Attribution-Reporting-Register-Source レスポンスヘッダーで指定されたもの)に関連付けられたソースデータを格納します。
詳細は、帰属レポート API を参照してください。
メモ: <a> 要素は帰属のトリガーとして使用することはできず、ソースのみです。
対応ブラウザ
| 機能 | デスクトップ | モバイル | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 125 | 125 | | | 125 | | |
| HTML 属性 | ||||||
attributionsrc 非推奨 | 125 | 125 | | | 125 | |
attributionsrc 非推奨 | 125 | 125 | | | 125 | |
attributionsrc 非推奨 | 125 | 125 | | | 125 | |
attributionsrc 非推奨 | 125 | 125 | | | 125 | |
| DOM API | ||||||
init_attributionReporting_parameter 非推奨 init.attributionReporting`パラメータ | 125 | 125 | | | 125 | |
attributionSrc 非推奨 | 133 | 133 | | | 133 | |
attributionSrc 非推奨 attributionSrc は HTMLImageElement インターフェイスのプロパティで、 img 要素の attributionsrc 属性をプログラムで取得および設定し、その属性の値を反映します。attributionsrc は、ブラウザーに画像リクエストとともに Attribution-Reporting-Eligible ヘッダーを送信するように指示します。 | 125 | 125 | | | 125 | |
attributionSrc 非推奨 attributionSrc は HTMLScriptElement インターフェイスのプロパティで、script 要素の attributionsrc 属性をプログラムで取得・設定し、その属性値を反映します。attributionsrc はブラウザーにスクリプトリソースリクエストと一緒に Attribution-Reporting-Eligible ヘッダーを送信することを指定します。 | 125 | 125 | | | 125 | |
Request (init attributionReporting parameter) 非推奨 init.attributionReporting`パラメータ | 125 | 125 | | | 125 | |
open (features parameter attributionsrc) 非推奨 パラメータ `features` には `"attributionsrc"` 値を指定する。 | 125 | 125 | | | 125 | |
| setAttributionReporting() は XMLHttpRequest インターフェイスのメソッドで、このリクエストのレスポンスに対して、 JavaScript ベースの帰属ソースまたは帰属トリガーを登録できるようにしたいことを示します。 | 125 | 125 | | | 125 | |
| その他 | ||||||
html.elements.iframe.allow.attribution-reporting 非推奨 | 117 | 117 | | | 117 | |
| HTTP Attribution-Reporting-Eligible リクエストヘッダは、対応するレスポンスがアトリビューションソースまたはトリガを登録する資格があることを示す。 | 117 | 117 | | | 117 | |
| HTTP Attribution-Reporting-Register-Source レスポンスヘッダは、ページ機能をアトリビューションソースとして登録します。このヘッダーは、Attribution-Reporting-Eligibleヘッダーを含むリクエストに対するレスポンスの一部として含まれます。このヘッダは、ユーザーがアトリビューションソースとやりとりするときにブラウザが保存すべき情報を提供します。この情報は... | 117 | 117 | | | 117 | |
| HTTP Attribution-Reporting-Register-Trigger レスポンスヘッダは、ページ機能をアトリビューショントリガーとして登録します。このヘッダーは、Attribution-Reporting-Eligibleヘッダーを含むリクエストに対するレスポンスの一部として含まれます。 | 117 | 117 | | | 117 | |
http.headers.Attribution-Reporting-Support 非推奨 | 117 | 117 | | | 117 | |
| HTTP の Permissions-Policy ヘッダーにおける ambient-light-sensor ディレクティブは、現在の文書が帰属レポート API を使うことをインターフェイスを通じて端末の周囲の環境における明るさの量に関する情報を収集することを許可するかどうかを制御します。 | 117 | 117 | | | 117 | |
基本構文
<a href="https://shop.example.com"
attributionsrc="https://adtech.example.com/register">
Advertisement link
</a>
<img src="ad.png"
attributionsrc="https://adtech.example.com/register"> 実務での使いどころ
-
Attribution reporting の活用
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
注意点
- 一部のブラウザでのみ対応。使用前にブラウザサポートを確認すること。
アクセシビリティ
- スクリーンリーダーでの読み上げを確認すること。