react-native-google-mobile-ads
    Preparing search index...

    Interface RequestOptions

    The RequestOptions interface. Used when passing additional request options before an advert is loaded.

    interface RequestOptions {
        categoryExclusions?: string[];
        contentUrl?: string;
        customTargeting?: Record<string, string | number | (string | number)[]>;
        keywords?: string[];
        neighboringContentUrls?: string[];
        networkExtras?: { [key: string]: string } & {
            collapsible?: CollapsiblePlacement;
        };
        publisherProvidedId?: string;
        publisherProvidedSignals?: { [key: string]: number[] };
        requestAgent?: string;
        requestNonPersonalizedAdsOnly?: boolean;
        serverSideVerificationOptions?: ServerSideVerificationOptions;
    }

    Hierarchy (View Summary)

    Index
    categoryExclusions?: string[]

    Google Ad Manager ad exclusion labels for the request. Line items and creatives carrying any of these labels are not served for this request. Define the labels in Ad Manager first.

    Takes an array of strings. An empty array sends no exclusions. Any other value (including null or an array containing non-string members) is rejected when the request options are validated: a synchronous throw, or a rejected promise for async APIs such as AdPools.create.

    Category exclusions are an Ad Manager feature; use them with Ad Manager ad units.

    InterstitialAd.createForAdRequest('/12345/ad-unit', {
    categoryExclusions: ['airline', 'automotive'],
    });
    contentUrl?: string

    URL of the content currently being displayed. Used for brand safety so displayed ads can have a content rating more appropriate to that page.

    HTTP or HTTPS only. Max length of 512.

    Pair with RequestOptions.neighboringContentUrls when the ad sits next to other web content (for example articles in a feed).

    InterstitialAd.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {
    contentUrl: 'https://www.example.com/article-a',
    });
    customTargeting?: Record<string, string | number | (string | number)[]>

    key-value pairs used for custom targeting

    Takes an object whose values are strings, finite numbers, or arrays of strings and numbers. Numbers are converted to strings before the request reaches the native SDK. Keys whose value is undefined are omitted; any other value type (including non-finite numbers, null, booleans, objects, and nested arrays) is rejected when the request options are validated: a synchronous throw, or a rejected promise for async APIs such as AdPools.create.

    keywords?: string[]

    An array of keywords to be sent when loading the ad.

    Setting keywords helps deliver more specific ads to a user based on the keywords.

    InterstitialAd.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {
    keywords: ['fashion', 'clothing'],
    });
    neighboringContentUrls?: string[]

    URLs representing web content near an ad. Used for brand safety so displayed ads can have a content rating more appropriate to neighboring content.

    HTTP or HTTPS only. Maximum of 4 URLs. Each URL max length of 512.

    Pair with RequestOptions.contentUrl for the page currently on screen.

    InterstitialAd.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {
    contentUrl: 'https://www.example.com/article-a',
    neighboringContentUrls: [
    'https://www.example.com/article-b',
    'https://www.example.com/article-c',
    ],
    });
    networkExtras?: { [key: string]: string } & {
        collapsible?: CollapsiblePlacement;
    }

    Attaches additional properties to an ad request for direct campaign delivery.

    Takes an array of string key/value pairs.

    Attaches ?campaign=abc&user=123 to the ad request:

    InterstitialAd.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {
    networkExtras: {
    campaign: 'abc',
    user: '123',
    },
    publisherProvidedId?: string

    Publisher provided identifier (PPID) for use in frequency capping, audience segmentation and targeting, sequential ad rotation, and other audience-based ad delivery controls across devices. See this article for more information.

    publisherProvidedSignals?: { [key: string]: number[] }

    Publisher Provided Signals (PPS) for Google Ad Manager.

    PPS allows publishers to send IAB taxonomy signals to help ad buyers evaluate and bid on inventory more effectively.

    Keys are IAB taxonomy names (e.g. IAB_CONTENT_2_2, IAB_AUDIENCE_1_1). Values are arrays of taxonomy IDs as integers.

    On Android, values are passed as putIntegerArrayList in the extras Bundle. On iOS, values are passed as NSArray<NSNumber> in GADExtras.

    InterstitialAd.createForAdRequest('/12345/ad-unit', {
    publisherProvidedSignals: {
    IAB_CONTENT_2_2: [533, 483], // Soccer, Sports
    IAB_AUDIENCE_1_1: [6, 284], // Sports & Fitness, Soccer
    },
    });
    requestAgent?: string

    Sets the request agent string to identify the ad request's origin. Third party libraries that reference the Mobile Ads SDK should call this method to denote the platform from which the ad request originated. For example, if a third party ad network called "CoolAds network" mediates requests to the Mobile Ads SDK, it should call this method with "CoolAds".

    InterstitialAd.createForAdRequest('ca-app-pub-3940256099942544/1033173712', {
    requestAgent: 'CoolAds',
    });
    requestNonPersonalizedAdsOnly?: boolean

    If true only non-personalized ads will be loaded.

    Google serves personalized ads by default. This option must be true if users who are within the EEA have only given consent to non-personalized ads.

    serverSideVerificationOptions?: ServerSideVerificationOptions

    Server Side Verification(SSV) Options See Google Mobile SDK Docs for more information.