Products using the Adobe Analytics extension

There is not a dedicated field in Adobe Experience Platform Data Collection to set this variable; however, multiple third-party extensions exist to help.

  1. Log in to Adobe Experience Platform Data Collection using your AdobeID credentials.
  2. Click the desired tag property.
  3. Go to the Extensions tab, then click Catalog to see all available extensions.
  4. Search for the term “product”, which reveals several extensions available to help set this variable.

You can use one of these extensions, or you can use the custom code editor following AppMeasurement syntax below.

s.products in AppMeasurement and the Analytics extension custom code editor

The s.products variable is a string that contains multiple delimited fields per product. Delimit each field with a semicolon (;) in the string.

  • Category (optional): The product category. The maximum length for this field is 100 bytes.
  • Product name (required): The name of the product. The maximum length for this field is 100 bytes.
  • Quantity (optional): How many of this product is in the cart. This field only applies to hits with the purchase event.
  • Price (optional): The total price of the product as a decimal. If quantity is more than one, set price to the total and not the individual product price. Align the currency of this value to match the currencyCode variable. Do not include the currency symbol in this field. This field only applies to hits with the purchase event.
  • Events (optional): Events tied to the product. Delimit multiple events with a pipe (|). See events for more information.
  • eVars (optional): Merchandising eVars tied to the product. Delimit multiple merchandising eVars with a pipe (|). See merchandising eVars for more information.
// Set a single product using all available fields
s.products = "Example category;Example product;1;3.50;event1=4.99|event2=5.99;eVar1=Example merchandising value 1|eVar2=Example merchandising value 2";

This variable supports multiple products in the same hit. It is valuable for shopping cart and purchases containing multiple products. The maximum length for the entire products string is 64k bytes. Separate each product with a comma (,) in the string.

// Set multiple products - useful for when a visitor views their shopping cart
s.products = "Example category 1;Example product 1;1;3.50,Example category 2;Example product 2;1;5.99";
WARNING
Strip all semicolons, commas, and pipes from product names, categories, and merchandising eVar values. If a product name includes a comma, AppMeasurement parses it as the start of a new product. This incorrect parsing throws off the rest of the product string, causing incorrect data in dimensions and reports.