transactionID
The transactionID
variable uniquely identifies a transaction so that the hit can provide dimension values to data uploaded through Transaction ID data sources. This variable is valuable in cases where you want to fill out offline channel data with values collected from online channel data.
When you set transactionID
on a hit, Adobe takes a “snapshot” of all Analytics variables set or persisted at that point in time. See Transaction ID data sources for the list of dimensions included in the snapshot. Adobe remembers all transaction ID values (linked and unlinked) for up to 25 months.
Transaction ID using the Web SDK
Transaction ID is mapped to the following variables:
- XDM object:
xdm.commerce.order.payments[3].transactionID
orxdm.commerce.order.payments.transactionID
- Data object:
data.__adobe.analytics.transactionID
ordata.__adobe.analytics.xact
Transaction ID using the Adobe Analytics extension
You can set transaction ID either while configuring the Analytics extension (global variables) or under rules.
- Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
- Click the desired tag property.
- Go to the Rules tab, then click the desired rule (or create a rule).
- Under Actions, click an existing Adobe Analytics - Set Variables action or click the ‘+’ icon.
- Set the Extension drop-down list to Adobe Analytics, and the Action Type to Set Variables.
- Locate the Transaction ID section.
You can set transaction ID to any string value, including data elements.
s.transactionID in AppMeasurement and the Analytics extension custom code editor
The s.transactionID
variable is a string containing a unique identifier for a transaction. Valid values include alphanumeric characters up to 100 bytes in length. Its default value is an empty string.
s.transactionID = "ABC123";
If you have more than one transaction ID for a hit, you can delimit each with a comma. Multiple transaction IDs are still subject to the 100-byte limit.
s.transactionID = "ABC123,XYZ456";
1234
and a sales lead transaction ID value of 1234
, they can conflict and cause unexpected results. Make sure that transaction IDs contain unique formats per offline channel and differentiate them if necessary. For example, set your call center transaction ID to call_1234
and your sales lead transaction ID lead_1234
in both Data Sources and AppMeasurement.