Purchase tracking into AEP via GTM (Edge Network API): where should booking details live?
Hello All,
We're implementing purchase tracking into AEP for our airline website and testing it in our acceptance environment. Looking for advice on the right setup before we go to production.
Our setup
- GTM Custom HTML tag that POSTs to the Edge Network API (
/ee/v2/collect), not Web SDK - Datastream → AEP service → event dataset based on our "Web Event" schema (XDM ExperienceEvent, Profile enabled)
eventType: commerce.purchases, ECID inidentityMap
What works / what doesn't
commerce.order,commerce.purchasesandproductListItemsland in the dataset fine- Our custom booking fields (
_tenant.booking.*: base fare, taxes, ancillaries, pax counts, route type) are dropped
What we found so far
- Our payload had the custom fields nested as
xdm.data._tenant. We fixed it toxdm._tenant. - The web event schema doesn't contain any booking fields. Our booking data lives in a separate schema based on XDM Individual Profile, with its own dataset, fed from our backend systems.
Simplified payload:
{
"events": [
{
"xdm": {
"identityMap": {
"ECID": [{ "id": "<ECID>", "authenticatedState": "ambiguous", "primary": true }]
},
"eventType": "commerce.purchases",
"commerce": {
"purchases": { "value": 1 },
"order": { "purchaseID": "<XXX>", "priceTotal": 486.5, "currencyCode": "EUR" }
},
"productListItems": [{ "SKU": "XXX_XXX-XX", "priceTotal": 486.5 }],
"_tenant": {
"booking": {
"baseFare": 320.0,
"fareTaxes": 23.5,
"ancillariesTotal": 45.0,
"paxTotals": { "adult": 1, "child": 0, "youth": 0, "infant": 0 },
"routeType": "RT"
}
}
}
}
]
}
Questions
- Should we create a new ExperienceEvent field group with the booking fields and add it to the web event schema? Or would you keep the web event lean (purchaseID, total, currency, SKU) and rely on the backend booking data for the breakdown?
- If both the web event and the backend booking data end up in CJA, how do you avoid counting revenue twice?
- To connect the anonymous web purchase with the backend profile, is adding the CRM ID (when logged in) to
identityMapnext to ECID the recommended way?
Any experience or docs you can share would really help. Thanks!
Best