- アプリで、入札、インプレッションのレポート、広告のアトリビューションのレポートに使用する、アプリの広告IDを取得します(
fetchAdvertisingId)。 - インタレストベース広告に関するユーザーの設定を取得します(
isAdvertisingTrackingEnabled)。
動作
- Verify tracking before you use the advertising ID. Call
isAdvertisingTrackingEnabledand check the result before you use the value fromfetchAdvertisingIdfor interest-based advertising. If it returnsfalse, the user has opted out of interest-based advertising, so serve contextual (non-personalized) advertisements rather than interest-based ones. - Child profiles. On a child profile,
isAdvertisingTrackingEnabledreturnsfalseregardless of the Interest-based Ads setting. The user has opted out of interest-based advertising, so serve contextual (non-personalized) advertisements rather than interest-based ones. - Service unavailable.
fetchAdvertisingIdreturns an empty string if it cannot reach the Advertising Manager service. This does not raise an error. An empty string means the Advertising Manager service was unreachable. Do not use an empty string as a valid advertising ID.
はじめに
セットアップ
- package.jsonファイルの
dependenciesセクションに、以下のライブラリ依存関係を追加します。
-
manifest.tomlに、Ad ID Retrieverへのアクセスに必要な以下の権限を追加します。
使用方法
この例は、Ad ID Retrieverサービスの実装方法を示しています。この例では、2つのボタンを備えたシンプルなUIを使用して、広告IDの取得と広告トラッキングステータスの確認という2つの主要機能を紹介します。APIリファレンス
クラス
- AdIdRetriever - 広告IDと広告トラッキング状態を取得するためのAPIを提供します。

