s.purchaseID in AppMeasurement and the Analytics extension custom code editor
The s.purchaseID
variable is a string that contains a unique identifier to a purchase. It is set on the same hit as a purchase event. Only use alpha-numeric characters to populate this variable.
This variable can store a maximum of 20 bytes; values longer than 20 bytes are truncated. If this truncated value matches subsequent truncated values, those subsequent hits are de-duplicated.
s.purchaseID = "ABC123";
If using the digitalData
data layer:
s.purchaseID = digitalData.transaction.transactionID;
Do not use a randomization function to generate a purchase ID.
Analytics
- Implement Adobe Analytics
- Analytics Release Notes
- AppMeasurement release notes
- Analytics variables, functions, and methods
- Prepare to implement Adobe Analytics
- Implement Analytics using Experience Platform Edge
- Implement Analytics using the Adobe Analytics extension
- Implement Analytics using JavaScript
- Implement Analytics on other platforms
- Implement Analytics on mobile devices
- Implementation use cases
- Validate your implementation
- Frequently asked questions
- Review your implementation