Class AdImpression
Represents an ad impression to be sent to the justtrack backend. This class is used to collect data related to ad impressions, which can be utilized to calculate the ad revenue generated by your app.
public class AdImpression
extends Object
java.lang.Object ← io.justtrack.AdImpression
Constructors
AdImpression
public AdImpression(@NonNull AdUnit unit, @NonNull String sdkName)
AdImpression
public AdImpression(@NonNull String unit, @NonNull String sdkName)
Methods
setBundleId
public AdImpression setBundleId(@Nullable String bundleId)
Sets the bundle ID for this ad impression.
Parameters
Name | Description |
---|---|
bundleId | The bundle ID of the advertised app. May be null. |
Returns
This instance to allow for method chaining.
setInstanceName
public AdImpression setInstanceName(@Nullable String instanceName)
Sets the instance name for this ad impression.
Parameters
Name | Description |
---|---|
instanceName | The name of the instance of the ad. May be null. |
Returns
This instance to allow for method chaining.
setNetwork
public AdImpression setNetwork(@Nullable String network)
Sets the network for this ad impression.
Parameters
Name | Description |
---|---|
network | The name of the ad network which provided the ad. May be null. |
Returns
This instance to allow for method chaining.
setPlacement
public AdImpression setPlacement(@Nullable String placement)
Sets the placement for this ad impression.
Parameters
Name | Description |
---|---|
placement | The placement of the ad. May be null. |
Returns
This instance to allow for method chaining.
setRevenue
public AdImpression setRevenue(@Nullable Money revenue)
Sets the revenue for this ad impression.
Parameters
Name | Description |
---|---|
revenue | The amount of revenue this ad generated. May be zero but must not be negative. |
Returns
This instance to allow for method chaining.
setSegmentName
public AdImpression setSegmentName(@Nullable String segmentName)
Sets the segment name for this ad impression.
Parameters
Name | Description |
---|---|
segmentName | The name of the segment of the ad. May be null. |
Returns
This instance to allow for method chaining.
setTestGroup
public AdImpression setTestGroup(@Nullable String testGroup)
Sets the test group for this ad impression.
Parameters
Name | Description |
---|---|
testGroup | The test group of the user if we are A/B testing. May be null. |
Returns
This instance to allow for method chaining.