AdImpression class

Ad impression payload to be forwarded 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.

Example:

final impression = AdImpression(
  unit: AdUnit.banner,
  adSdkName: 'admob',
  adNetwork: 'facebook',
  placement: 'home_screen',
  revenue: Money(0.01, 'USD'),
);

await JusttrackSdk.forwardAdImpression(impression);

Constructors

AdImpression({required AdUnit unit, required String adSdkName, String? adNetwork, String? placement, String? testGroup, String? segmentName, String? instanceName, String? bundleId, Money? revenue})
Creates an AdImpression with an AdUnit enum value.
AdImpression.fromString({required String adUnit, required String adSdkName, String? adNetwork, String? placement, String? testGroup, String? segmentName, String? instanceName, String? bundleId, Money? revenue})
Creates an AdImpression with a string ad unit.

Properties

adNetwork String?
The name of the ad network which provided the ad. May be null.
final
adSdkName String
The name of the SDK which provided the event (e.g., "ironsource", "admob").
final
adUnit String
The format of the ad impression (e.g., "banner", "interstitial").
final
bundleId String?
The bundle ID of the advertised app. May be null.
final
hashCode int
The hash code for this object.
no setterinherited
instanceName String?
The name of the instance of the ad. May be null.
final
placement String?
The placement of the ad. May be null.
final
revenue Money?
The amount of revenue this ad generated. May be null.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
segmentName String?
The name of the segment of the ad. May be null.
final
testGroup String?
The test group of the user if A/B testing. May be null.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited