- Retrieve the app advertising ID for bidding, reporting impressions, and reporting attributions of ads. (
fetchAdvertisingId) - Retrieve a user’s preference on interest-based advertisements. (
isAdvertisingTrackingEnabled)
Get Started
Setup
- Add the following library dependency to the
dependenciessection of your package.json file.
-
In your manifest.toml, add the following privileges required to access Ad ID Retriever.
Usage
This example demonstrates how to implement the Ad ID Retriever service. The example provides a simple UI with two buttons that showcases both core functionalities: fetching the advertising ID and checking the advertising tracking status.API Reference
Classes
- AdIdRetriever — AdIdRetriever provides APIs for retrieving advertising IDs and advertising tracking state.

