updateConversionValue(_:)
Updates the conversion value and verifies the first launch of an app installed as a result of an ad.
Declaration
class func updateConversionValue(_ conversionValue: Int)Parameters
- conversionValue:
An unsigned 6-bit value (
>=0and<=63). The app or the ad network determines the meaning of the value. The default value is0.
Mentioned in
Discussion
Apps that ad networks advertise call updateConversionValue(_:) or registerAppForAdNetworkAttribution() when the app first launches, to register the attribution.
Apps may call updateConversionValue(_:) again within a rolling 24-hour period to update the conversion value. Calling this method serves two purposes:
It registers the attribution by generating an install notification — the cryptographically signed data that confirms that a user installed and launched this app as a result of an ad.
It enables the app to provide and update a conversion value.
Conversion values are a 6-bit value that the ad network or the app defines. The app decides when to update the value, which it can do any number of times before a rolling 24-hour timer expires. The 24-hour timer restarts each time the app calls this method with a valid conversion value greater than the previous value. When the timer expires, the conversion value is final and subsequent calls to updateConversionValue(_:) have no effect.
The device sends the install notification postback to the ad network’s URL within 0-24 hours after the timer expires. The postback only contains the final conversion value if sending the data meets Apple’s privacy threshold. Only postbacks with an ad attribution can contain a conversion value; non-winning postbacks don’t include a conversion value. For more information, see Receiving ad attributions and postbacks.
Ad networks must verify the postback after receiving it. See Verifying an install-validation postback for more information.