Google Mobile Ads SDK for React Native ช่วยให้คุณใช้พารามิเตอร์การประมวลผลข้อมูลแบบจำกัด (RDP) ของ Google เพื่อระบุว่าจะเปิดใช้ RDP หรือไม่ เพื่อช่วยให้คุณปฏิบัติตามกฎหมายคุ้มครองความเป็นส่วนตัวของรัฐในสหรัฐอเมริกา นอกจากนี้ Google ยังรองรับ Global Privacy Platform (GPP) สำหรับรัฐที่เกี่ยวข้องในสหรัฐอเมริกาด้วย เมื่อ Google Mobile Ads SDK for React Native ใช้สัญญาณอย่างใดอย่างหนึ่ง SDK จะจำกัดตัวระบุที่ไม่ซ้ำกันบางอย่างและข้อมูลอื่นๆ ที่มีการประมวลผลเพื่อให้บริการแก่คุณ
/** * Example loading an interstitial ad with restricted data processing (RDP). */exportasyncfunctionloadInterstitialAdWithRdp(adUnitId:string,):Promise<InterstitialAd|null>{try{constad=awaitInterstitialAd.load({adUnitId,extras:{rdp:'1',},});returnad;}catch(error){constloadError=errorasLoadAdError;console.error('Failed to load interstitial ad:',loadError.message);returnnull;}}
นอกจากนี้ คุณยังแจ้งให้ Google เปิดใช้สัญญาณ RDP ในแอปได้โดยเพิ่มข้อมูลต่อไปนี้