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:
- Kotlin
- Groovy
dependencies {
implementation("io.justtrack:adapter-unityads:1.0.0")
}
dependencies {
implementation "io.justtrack:adapter-unityads:1.0.0"
}
Then, initialize the adapter, and integrate it with the justtrack SDK:
import io.justtrack.integrations.unityads.UnityAdsIntegrationAdapter
// Integrate the adapter while you build the SDK
val sdk = JustTrackSdkBuilder(this, API_TOKEN)
.addIntegrationAdapters(UnityAdsIntegrationAdapter())
.build()
// Or after...
sdk.integrateWith(UnityAdsIntegrationAdapter())