AdImpression
public 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.
init(...)
public init(unit: String, sdkName: String)
init(...)
public convenience init(unit: AdUnit, sdkName: String)
set(network:)
Sets the network for this ad impression.
public func set(network: String?) -> Self
Parameters
network | The name of the ad network which provided the ad. May be nil. |
Return Value
This instance to allow for method chaining.
set(placement:)
Sets the placement for this ad impression.
public func set(placement: String?) -> Self
Parameters
placement | The placement of the ad. May be nil. |
Return Value
This instance to allow for method chaining.
set(testGroup:)
Sets the test group for this ad impression.
public func set(testGroup: String?) -> Self
Parameters
testGroup | The test group of the user if we are A/B testing. May be nil. |
Return Value
This instance to allow for method chaining.
set(segmentName:)
Sets the segment name for this ad impression.
public func set(segmentName: String?) -> Self
Parameters
segmentName | The name of the segment of the ad. May be nil. |
Return Value
This instance to allow for method chaining.
set(instanceName:)
Sets the instance name for this ad impression.
public func set(instanceName: String?) -> Self
Parameters
instanceName | The name of the instance of the ad. May be nil. |
Return Value
This instance to allow for method chaining.
set(bundleId:)
Sets the bundle ID for this ad impression.
public func set(bundleId: String?) -> Self
Parameters
bundleId | The bundle ID of the advertised app. May be nil. |
Return Value
This instance to allow for method chaining.
set(revenue:)
Sets the revenue for this ad impression.
public func set(revenue: Money?) -> Self
Parameters
revenue | The amount of revenue this ad generated. May be zero but must not be negative. |
Return Value
This instance to allow for method chaining.