Integrate with Unity Ads
If you use Unity Ads, you can automatically track Advertisement revenue from Impressions with justtrack SDK.
Before you begin
Please review the following compatibility matrix to make sure you're using compatible versions:
justtrack SDK | Unity Adapter | Unity SDK |
---|---|---|
6.0.0+ | 1.x | 4.x |
Integrate with Unity Ads
First, add the adapter dependency to your package manager:
- Cocoa Pods
- Carthage
pod 'JustTrackSDKUnityAdsAdapter', '~> 1.0.0'
binary "https://sdk.justtrack.io/carthage/JustTrackSDKUnityAdsAdapter.json"
info
Please note we don't support Swift Package Manager for Unity Ads.
Then, initialize the adapter, and integrate it with the justtrack SDK:
import JustTrackSDK
import JustTrackSDKUnityAdsAdapter
// Build the SDK
let sdk = try JustTrackSdkBuilder(apiToken: apiToken)
.set(trackingId: trackingId, trackingProvider: trackingProvider)
.build()
// Integrate the Unity Ads adapter
sdk.integrate(with: JusttrackUnityAdsAdapter())