Product syntax using the Web SDK

If using the XDM object, product syntax merchandising variables use the following XDM fields:

  • Product syntax merchandising eVars are mapped under xdm.productListItems[]._experience.analytics.customDimensions.eVars.eVar1 to xdm.productListItems[]._experience.analytics.customDimensions.eVars.eVar250.
  • Product syntax merchandising events are mapped under xdm.productListItems[]._experience.analytics.event1to100.event1.value to xdm.productListItems[]._experience.analytics.event901to1000.event1000.value. Event serialization XDM fields are mapped under xdm.productListItems[]._experience.analytics.event1to100.event1.id to xdm.productListItems[]._experience.analytics.event901to1000.event1000.id.
NOTE
When you set events under productListItems, you do not need to set them in the event string. If they are set in both places, the value in the event string takes precedence.

The following example shows a single product using multiple merchandising eVars and events:

"productListItems": [
  {
    "name": "Bahama Shirt",
    "priceTotal": "12.99",
    "quantity": 3,
    "_experience": {
      "analytics": {
        "customDimensions" : {
          "eVars" : {
            "eVar10" : "green",
            "eVar33" : "large"
          }
        },
        "event1to100" : {
          "event4" : {
            "value" : 1
          },
          "event10" : {
            "value" : 2,
            "id" : "abcd"
          }
        }
      }
    }
  }
]

The above example object would be sent to Adobe Analytics as ";Bahama Shirt;3;12.99;event4|event10=2:abcd;eVar10=green|eVar33=large".

If using the data object, eVar merchandising uses data.__adobe.analytics.eVar1 - data.__adobe.analytics.eVar250 following AppMeasurement syntax.