This guide shows how to integrate Nexx360 Direct InApp with the Google Mobile Ads SDK on iOS.
The Nexx360 Direct InApp call must be made before the Google Ad Manager ad request. The returned targeting key-values must be set on the GAMRequest before calling loadRequest:.
A Nexx360 account with a configured tag_id or placement
Integration Flow
1. App starts ad loading
2. App calls Nexx360 /directinapp endpoint (HTTP GET)
3. Nexx360 returns targeting key-values
4. App creates GAMRequest with targeting key-values
5. App loads ad via Google Ad Manager SDK
Step 1: Create the Nexx360 Helper
Swift
Create a helper class to call the Nexx360 endpoint and parse the response:
Step 2: Load a Banner Ad with Nexx360 Targeting
Using async/await (iOS 13+)
Using completion handler
Using Placement Instead of Tag ID
If your Nexx360 setup uses placements, pass the placement parameter instead of tagId:
GDPR Consent
If your app collects GDPR consent (e.g., via a CMP), pass the consent string:
App Tracking Transparency (iOS 14.5+)
On iOS 14.5+, you must request ATT permission before accessing the IDFA:
Pass the IDFA to the ifa parameter only when tracking is authorized.
Always call the Nexx360 endpoint beforeload(request). The targeting key-values must be present in the GAMRequest for the bid to compete in Google Ad Manager.