Skip to main content
Level 1
October 7, 2026
Question

Purchase tracking into AEP via GTM (Edge Network API): where should booking details live?

  • October 7, 2026
  • 1 reply
  • 9 views

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 in identityMap

What works / what doesn't

  • commerce.order, commerce.purchases and productListItems land 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

  1. Our payload had the custom fields nested as xdm.data._tenant. We fixed it to xdm._tenant.
  2. 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

  1. 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?
  2. If both the web event and the backend booking data end up in CJA, how do you avoid counting revenue twice?
  3. To connect the anonymous web purchase with the backend profile, is adding the CRM ID (when logged in) to identityMap next to ECID the recommended way?

Any experience or docs you can share would really help. Thanks!

Best

1 reply

Prasanth
Level 2
October 8, 2026

Hi ​@FiratY 

Here is the recommended architecture pattern for your setup:

1. Web Schema Field Group (Recommended) Create a custom XDM ExperienceEvent Field Group containing your _tenant.booking.* fields and attach it directly to your Web Event Schema. Fields are silently dropped if they aren't part of the schema mapped to your Datastream. Including booking details in the web schema is crucial if you plan to drive real-time personalization or Journey Optimizer triggers (e.g., ancillary upsells) immediately after purchase.

2. Handling Duplicate Revenue in CJA If both Web Purchase and Backend Transaction datasets are included in your CJA Data View:

  • Metric Deduplication: Define purchaseID as a deduplication key on your Purchase/Revenue metric in CJA Data View settings.

  • Filtered Metrics: Alternatively, set the primary "Revenue" metric in CJA to only filter on your primary backend event dataset, while using the Web dataset for web attribution and funnel conversion analysis.

3. Identity Graph Linking Passing CRM_ID (or pnr / loyaltyId) alongside ECID in identityMap on the purchase event is the exact recommended pattern. This stitches the anonymous web browsing history (ECID) to the authenticated backend customer profile (CRM_ID) in AEP's Identity Graph automatically.