Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazonアプリストア
Ring
AWS
ドキュメント
Support
Contact Us
My Cases
開発
設計と開発
公開
リファレンス
サポート
メインコンテンツへスキップ
Ad ID Retrieverは、デバイス上で広告IDと広告トラッキングステータスを取得するサービスです。 ユースケース:
  • アプリで、入札、インプレッションのレポート、広告のアトリビューションのレポートに使用する、アプリの広告IDを取得します(fetchAdvertisingId)。
  • インタレストベース広告に関するユーザーの設定を取得します(isAdvertisingTrackingEnabled)。

動作

  • Verify tracking before you use the advertising ID. Call isAdvertisingTrackingEnabled and check the result before you use the value from fetchAdvertisingId for interest-based advertising. If it returns false, 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, isAdvertisingTrackingEnabled returns false regardless 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. fetchAdvertisingId returns 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.

はじめに

セットアップ

  1. package.jsonファイルのdependenciesセクションに、以下のライブラリ依存関係を追加します。
  1. manifest.tomlに、Ad ID Retrieverへのアクセスに必要な以下の権限を追加します。

使用方法

この例は、Ad ID Retrieverサービスの実装方法を示しています。この例では、2つのボタンを備えたシンプルなUIを使用して、広告IDの取得と広告トラッキングステータスの確認という2つの主要機能を紹介します。

APIリファレンス

クラス

  • AdIdRetriever - 広告IDと広告トラッキング状態を取得するためのAPIを提供します。

最終更新日 2026年10月26日