Skip to main content
Version: SDK 4.7.x

Revenue

With the justtrack SDK, you can track advertisement and in-app purchase revenue. Advertising revenue can be tracked automatically from the IronSource SDK right now (see Enable real-time revenue data with ironSource). If you are using another SDK to deliver ads for your users, you can track the impressions manually.

Forwarding in-app purchases

If the user performs an in-app product or subscription purchase, you can forward the purchase via the justtrack SDK to our backend. How you do this depends on the platform you're using:

For Android, in-app purchases are tracked automatically, by default. However, you can use the following method to change this behavior:

JustTrackSDK.SetAutomaticInAppPurchaseTracking(forwardPurchasesAutomatically);

Alternatively, you can change this setting in the menu:

info

Forwarding in-app purchases from the SDK is only the first step toward seeing the data in justtrack. You also must set up a service account and real-time developer notifications. Read our documentation to learn how.

info

Currently, we support version 4.12.x of the Unity IAP plugin.

Forwarding ad impressions

Our SDK can forward ad impression data to the justtrack platform so you can track your app's ad revenue.

Automatic impression forwarding

We can automatically forward ad impressions for several partners. Use these methods to integrate the partner SDK:

AdColony

integrateWithAdColony()

AppLovin

integrateWithAppLovin(userIdSource: UserIdSource, listenFor: AppLovinAdEvent)

Chartboost

integrateWithChartboost()

adjoe WAVE

adjoe WAVE is integrated automatically if you use their SDK.

ironSource

Refer to our ironSource integration guide.

Unity

integrateWithUnityAds()

Manual impression forwarding

If your ad network isn't available for automatic ad impression forwarding, you can manually forward impression data using .ForwardAdImpression():

JustTrackSDK.ForwardAdImpression(
new AdImpression("format","sdk_name")
.setNetwork("network")
.setPlacement("placement")
.setTestGroup("test_group")
.setSegmentName("segment_name")
.setInstanceName("instance_name")
.setBundleId("bundle_id")
.setRevenue(new Money(10.0,"USD")
);

This method accepts an AdImpression whose parameters are:

  • adFormat: The format of the ad.
  • adSdkName: The name of the SDK which provided the event, for example ironsource or admob.
info

The SDK name must be lowercase. So, for example, you would use ironsource, not ironSource.

Additionally, you can use the following methods to set more dimensions:

MethodArgumentAcceptable values
.setNetwork()The name of the ad network that provided the ad.String value or null.
.setPlacement()The placement of the ad.String value or null.
.setTestGroup()The test group of the user, if you are A/B testing.String value or null.
.setSegmentName()The name of the segment of the ad.String value or null.
.setInstanceName()The name of the instance of the ad.String value or null.
.setBundleId()The app's bundle ID.String value or null.
.setRevenue()The amount of revenue this ad generated.Money object with a non-negative amount. The currency must be a three-letter uppercase ISO 4217 string.

Upon success, .forwardAdImpression() returns true. If a parameter is invalid, false is returned.