@wscsports/blaze-rtn-gam-ads
Version:
WSC Sports Blaze GAM Ads component for React Native
62 lines • 3.06 kB
TypeScript
import { BlazeContentExtraInfo, BlazePrimitive } from "@wscsports/blaze-rtn-sdk";
export type BlazeCustomNativeAdEventType = 'openedAd' | 'adPageStart' | 'adPageFirstQuarter' | 'adPageThird' | 'adPageMid' | 'adPageComplete' | 'pausedAdPage' | 'resumedAdPage' | 'ctaClicked';
interface BlazeGAMCustomNativeAdsDelegateOnAdEventParams {
eventType: BlazeCustomNativeAdEventType;
}
interface BlazeGAMCustomNativeAdRequestInfo {
adUnitId: string;
templateId: string;
adContext: Record<string, string>;
extraInfo: BlazeContentExtraInfo;
}
export interface BlazeGAMCustomNativeAdRequestParams {
requestDataInfo: BlazeGAMCustomNativeAdRequestInfo;
}
export interface BlazeGAMCustomNativeAdsDelegate {
/**
* This function will be triggered every time an event on an ad will happen.
*
* @param params The data associated with the ad involved in the event.
*/
onGAMAdEvent?: (params: BlazeGAMCustomNativeAdsDelegateOnAdEventParams) => void;
/**
* Called when an error occurs during ad loading or playback.
*
* @param errorMessage The error message associated with the error.
*/
onGAMAdError?: (errorMessage: string) => void;
/**
* Returns custom targeting properties to be added to the GAM ad request.
* This is called asynchronously from the native side right before an ad request.
*
* @param params The request data information provides additional info regarding the current ad request.
* @returns A dictionary of key-value pairs to be added to the ad request
*/
customGAMTargetingProperties?: (params: BlazeGAMCustomNativeAdRequestParams) => Record<string, string>;
/**
* Returns custom targeting properties to be added to the GAM ad request.
* This is called asynchronously from the native side right before an ad request.
*
* @param params The request data information provides additional info regarding the current ad request.
* @returns A custom publisher-provided identifier (PPID) for more granular targeting.
*/
publisherProvidedId?: (params: BlazeGAMCustomNativeAdRequestParams) => string | undefined;
/**
* Provides additional network extras through GADExtras for customizing ad requests.
* Use this to set network-specific parameters that can enhance ad targeting or behavior.
*
* @param params The request data information provides additional info regarding the current ad request.
* @returns A dictionary of key-value pairs to be added to the ad request
*/
networkExtras?: (params: BlazeGAMCustomNativeAdRequestParams) => Record<string, BlazePrimitive>;
}
export declare class BlazeCustomNativeAdsDelegateHelper {
static registerDelegate(delegate?: BlazeGAMCustomNativeAdsDelegate | null): void;
private static onGAMAdEvent;
private static onGAMAdError;
private static customGAMTargetingProperties;
private static publisherProvidedId;
private static networkExtras;
}
export {};
//# sourceMappingURL=BlazeGAMCustomNativeAdsDelegate.d.ts.map