GAM Module - React Native
Installing the Package
npm
npm i --save @wscsports/blaze-rtn-gam-adsyarn
yarn add @wscsports/blaze-rtn-gam-adsClassic ReactNative Setup
iOS
Setup your Google Ads Manager account id in your app - Please follow the step described here.
Android
Setup your Google Ads Manager account id in your app - Please follow the step described here.
Expo Setup
In addition to the SDK's plugin instructions that can be found here, In order to setup ads using Expo, you'll need a plugin that adds the GAM account ids in the native files described above. In order to do it you can use Expo's configuration params for both platform that can be found here.
Here is example for the result app.json file:
{
"expo": {
...
"ios": {
...
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
},
"android": {
...
"config": {
"googleMobileAdsAppId": "ca-app-pub-xxxxxxxx~xxxxxxxx"
}
},
...
}
Usage
For the usage please read more on this section.
Updated 11 days ago
Did this page help you?
