Migrate to SDK 8.0
This page covers every SDK platform and version. A part that applies only to some platforms starts with Platform: …, and a part that applies only to some SDK versions starts with SDK version: ….
This guide doesn't apply to the justtrack Unreal SDK. To integrate the SDK, follow our setup guide.
Platform: Android, iOS, Unity, React Native, Flutter, GodotThis guide walks you through upgrading an existing justtrack SDK 7.x integration to 8.0. It covers every breaking change, what to replace it with, and the new features you can adopt once you're on 8.0.
Update the dependency
Start by bumping the justtrack SDK dependency to 8.0.0, as described in Set up the SDK. Then work through the changes below that apply to your integration.
Breaking changes
Platform: Android| What changed | What to do instead |
|---|---|
JustTrackSdk.getTestGroupId() removed | Use remote config or setExperimentVariant() |
SdkBuilder interface removed | Use JustTrackSdkBuilder directly |
setEnableBroadcastReceiver() removed | Remove the call |
Attribution.type removed | Read attribution.campaign.type |
Campaign.id is now a String | Expect the external campaign ID as a string |
setExperimentVariant() arguments are non-null | Pass an empty list instead of null for tags |
| ironSource adapter is now 3.x | Update the adapter and drop the constructor argument |
| Adjoe integration removed | Remove the integration |
| What changed | What to do instead |
|---|---|
JustTrackSdk.testGroupId removed | Use remoteConfig or .setExperimentVariant() |
SDKBuilder protocol removed | Use JustTrackSdkBuilder directly |
AttributionResponse.type removed | Read response.campaign.type |
Campaign.id is now a String | Expect the external campaign ID as a string |
Dimension is String-backed | Use dimension.rawValue instead of .stringValue |
AdjoeIntegration removed | Remove the integration |
JTInAppPurchaseTracker.h is no longer public | Remove the import; the tracker is internal |
Console log prefix is JustTrackSDK: | Update any log filters that match the old prefix |
| What changed | What to do instead |
|---|---|
GetTestGroupId removed | Use the remote config methods |
AttributionCampaign.Id is now a string | Expect the external campaign ID as a string |
JustTrackSDK.Init() signature changed | Add enableConnectionTracking and pass an ApplicationVersion |
| What changed | What to do instead |
|---|---|
getTestGroupId() removed | Use remote config or setExperimentVariant() |
type removed from the attribution | Read attribution.campaign.type |
AttributionCampaign.id is now a string | Expect the external campaign ID as a string |
Test group IDs are gone
The deprecated test group ID API is removed. Use experiments instead, either by reading assignments from remote config or by reporting a variant you decided yourself.
Platform: Android// Before
val testGroupId = sdk.getTestGroupId()
// After
val assignments = sdk.remoteConfig.getAll()
// Before
let testGroupId = sdk.testGroupId
// After
let assignments = sdk.remoteConfig.allAssignments
// Before
var testGroupId = JustTrackSDK.GetTestGroupId();
// After
IRemoteConfig remoteConfig = JustTrackSDK.GetRemoteConfig();
Assignment[] assignments = remoteConfig.GetAll();
// Before
const testGroupId = await JustTrackSdk.getTestGroupId();
// After
const assignments = JustTrackSdk.remoteConfig.getAll();
Campaign IDs are external IDs
The campaign ID changed from an internal numeric ID to the campaign's external ID, as a string. This is the ID you see in the justtrack dashboard, so IDs from the SDK and the dashboard now match.
If you persist campaign IDs, compare them against other systems, or send them to your own backend, update those code paths and any stored values or database columns to expect strings.
Platform: Android, iOSSDK builder types are simplified
The builder interface that wrapped the concrete builder is gone. Reference the concrete builder type instead.
Platform: Android// Before
val builder: SdkBuilder = JustTrackSdkBuilder(this, API_TOKEN)
// After
val builder = JustTrackSdkBuilder(this, API_TOKEN)
The deprecated setEnableBroadcastReceiver() is removed as well. Delete the call.
// Before
let builder: SDKBuilder = JustTrackSdkBuilder(apiToken: apiToken)
// After
let builder = JustTrackSdkBuilder(apiToken: apiToken)
Dimensions are string-backed
Dimension is now a String-backed enum whose raw values are the names the platform uses, such as jt_action. The stringValue property is removed.
// Before
let name = Dimension.jtAction.stringValue
// After
let name = Dimension.jtAction.rawValue
setExperimentVariant requires values
setExperimentVariant() no longer accepts null for the experiment name, the variant, or the tags list. Pass an empty list when you have no tags. The happenedAt argument stays optional.
// Before
sdk.setExperimentVariant(experiment, variant, null, null)
// After
sdk.setExperimentVariant(experiment, variant, emptyList(), null)
Runtime initialization takes new arguments
JustTrackSDK.Init() gained an enableConnectionTracking parameter, and the separate app version and version code parameters are replaced by a single ApplicationVersion.
// Before
JustTrackSDK.Init(
apiToken, trackingId, trackingProvider, customUserId,
automaticInAppPurchaseTracking, manualStart, enableConsoleLogging,
serverUrl, bundleId, appVersion, appCode);
// After
JustTrackSDK.Init(
apiToken, trackingId, trackingProvider, customUserId,
automaticInAppPurchaseTracking, manualStart, enableConsoleLogging,
enableConnectionTracking,
serverUrl, bundleId, new ApplicationVersion(appVersion, appCode));
Pass null for ApplicationVersion to keep the default. If you supply one, both the version name and the version code are required.
The ironSource adapter moved to LevelPlay
The ironSource adapter is now version 3.x and is built against the Unity LevelPlay mediation API. IronSourceIntegrationAdapter no longer takes a user ID.
// Before
sdk.integrateWith(IronSourceIntegrationAdapter("your user id or null"))
// After
sdk.integrateWith(IronSourceIntegrationAdapter())
To associate your own user ID with justtrack, use Set a user ID. For the compatibility matrix, see Integrate with ironSource.
Platform: iOSLogging changed
The console log prefix is now JustTrackSDK: instead of JustTrackSdk:, and the SDK no longer writes to print. Update any log filters or log scraping that relies on the old prefix.
Behavior changes to expect
These changes don't break compilation, but they change what your app does at runtime.
Platform: Android, iOS, React Native, Unity- Remote config fetches more often. The default minimum fetch interval dropped from 24 hours to 1 hour, so experiment changes reach users sooner. See Configure the fetch interval.
- Activating an experiment twice is a no-op.
activatenow only enrolls assignments that are still pending, instead of sending a redundant enrollment request.
- Event values are recognized more reliably. A
MoneyorValuethat didn't come from the exact package instance in your bundle — a plain object, a value restored from JSON, or an instance from a duplicate copy of the package — is now classified by its shape. Events that previously lost their value are published with it, which can change the revenue and value numbers you see.
- Firebase app instance IDs are deduplicated. The same value isn't sent twice for one install, and a pending value is retried on app start, on reconnect, and when the install ID changes.
Adopt the new features
Once you're on 8.0, you can use these additions:
- Set global dimensions — set a dimension once and have the SDK attach it to every event that follows.
- Track the connection type — record whether the device was online or offline for each event.
- Purchase view and click actions on
JtPurchaseEvent, with typed constructors.
ApplicationVersionfor setting a custom version name and version code during runtime initialization.
For the complete list of changes in this release, see the changelog.