Passthrough of custom_targeting
ghostops opened this issue · 2 comments
ghostops commented
MAX Module Version
5.5.0
React Native Version
0.71.7
Device/Platform Info
iOS/Android
Current Behavior
We wanted to implement custom targeting for Google Ad Manager: https://developers.google.com/ad-manager/mobile-ads-sdk/android/targeting#custom_targeting
We were instructed to use the setLocalExtraParameterForKey
functionality in the native SDKs, problem being that it is not supported to pass through objects via localExtraParameters
. Also functions like setMRecLocalExtraParameter
only support string-values.
- iOS changelog: https://github.com/AppLovin/AppLovin-MAX-SDK-iOS/blob/master/GoogleAdManager/CHANGELOG.md#9401
- Android changelog: https://github.com/AppLovin/AppLovin-MAX-SDK-Android/blob/master/GoogleAdManager/CHANGELOG.md#20608
Expected Behavior
We would want to be able to pass through the values for custom_targeting
to the react component like this:
localExtraParameters={{ custom_targeting: { key: 'value', anotherKey: ['list', 'of', 'values'] } }}
How to Reproduce
- Add the prop
localExtraParameters={{ custom_targeting: { key: 'value', anotherKey: ['list', 'of', 'values'] } }}
to anyAppLovinMAXAdView
orAppLovinMAXNativeAdView
- You will get the JS error
AppLovinMAXNativeAdView only support string values...
coming fromsanitizeExtraParameters
Additional Info
No response
ghostops commented
@thomasmso Thanks 🙌