getAttributionToken
Button Merchant Library
Version
1.6.1
Packages
- androidJvm
- ButtonMerchantLibrary
- com.usebutton.merchant
- com.usebutton.merchant.exception
- com.usebutton.merchant.module
Method
getAttributionToken
@Nullable
open fun getAttributionToken(@NonNull context: Context): String
The attributionToken from the last inbound Button attributed Intent. For attribution to work correctly, you must:
- Always access this token directly—never cache it.
- Never manage the lifecycle of this token—Button manages the token validity window server-side.
- Always include this value when reporting orders to your order API.
Return
The last tracked Button attribution token.