AppImpression
A structure that represents an attributable impression you generate in response to a person’s interaction with an ad in an app.
Declaration
struct AppImpressionMentioned in
Discussion
To record a view-through impression, call beginView() when the ad content corresponding to the impression becomes visible, and endView() when the ad content disappears. The advertisement needs to be visible for at least two seconds for AdAttributionKit to record a view through impression; otherwise, the framework throws an error.
To support click-through attribution, place a UIEventAttributionView over the ad content and call either handleTap(reengagementURL:) or handleTap() after a person taps the ad content. The framework then validates that a person taps a UIEventAttributionView before recording the impression, and throws an error if it can’t validate that a tap occurred in a UIEventAttributionView.
After the framework validates the tap, it records the impression and then attempts to launch one of the user’s installed marketplaces to show the product page for the advertised app. The system uses the advertised item ID from the JSON Web Signature (JWS) string you provide to initialize the AppImpression, in addition to the user’s preferred marketplaces, to help determine which marketplace the framework needs to launch. If the app is already installed, the framework launches into the app’s Home Screen instead.
In iOS 18 and later, AppImpression supports reengagement for click-through interactions when the advertised app is already installed on the device. The system can deep-link into the advertised app when using handleTap(reengagementURL:). Click-through impressions can also qualify for reengagement postbacks by opting in for reengagement in the impression JWS. For more information about opting in for re-engagement, see Generating JWS impressions.
Topics
Creating an ad impression
Displaying view-through ads
Processing interactions with click-through ads
Accessing ad impression properties
adNetworkIDadvertisedItemIDcompactJWSRepresentationeligibleForReengagementidkeyIDpublisherItemIDsourceIDtimestamp