Expand my Community achievements bar.

SOLVED

AEP - Adobe Analytics "products" string using productListItems SKU "instead" of "name"

Avatar

Level 2

Hi folks

 

using XDM to ingest Web events data into AEP we noticed that the product SKU seems to be used to generate the Adobe Analytics "products" string which makes little sense if you have a numeric string instead of the actual speaking product "name".

 

Looking at the documentation here https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/products.html?lang=e... it states "Product is mapped to productListItems[].SKU or productListItems[].name. If both XDM fields are present, productListItems[].SKU is used."

 

So easy fix you might think, remove the "SKU", keep the "name" and we are good... no really!

 

"The message can't be validated due to the missing required property: #/productListItems/0: required key [SKU] not found." 

 

Can anyone make sense of the documentation and tell me how to get the actual productListItem "name" into the Analytics products string if a product list item's "SKU" is mandatory, hence overriding it in priority?

 

Best regards
Björn

1 Accepted Solution

Avatar

Correct answer by
Level 2

So after some ping-ponging with Adobe support, they checked internally and came back with this response

  • Close Case Comments: The query was productListItems SKU and name, and as per current logic, SKU is a required field. When using in WebSDK, the same value can be passed to SKU which is passed to name, since SKU is required one. 

In other words, they will adapt the documentation that the "SKU" is mandatory and if you want to use the "name" in the Analytics products string, you will have to set the value of the "name" in the "SKU" as well. Not ideal for people who want to use both a SKU and name but this is (at least currently) the way it is.


Case closed
Björn

View solution in original post

4 Replies

Avatar

Level 5

Hey Bjorn,

The documentation is correct because the product SKU is required for the Analytics products string. However, you can use a custom variable to override the SKU with the product name.

To do this, you can use the following steps:

  1. Create a custom variable in XDM.
  2. Set the value of the variable to the product name.
  3. In the Analytics implementation, use the custom variable instead of the SKU.

This will allow you to use the product name in the Analytics products string, even if the SKU is mandatory.

Here is an example of how to use a custom variable in XDM:

{
  "name": "Product Name",
  "value": "The product name"
}

Here is an example of how to use a custom variable in the Analytics implementation:

s.products = "Product Name";

 Let me know how it goes, I hope it helps at least.

 

Thanks

Madhan

Avatar

Level 2

Hi Madhan

to be clear, I am using the automatically applied mapping of the XDM's productListItems to the products string via AEP, no "s" variable available since everything is being handled through the Experience Platform.

 

So this should work out of the box, or at least the SKU should be optional to be able to apply the override with the name as the documentation suggests.
If this is not possible, then either the documentation is incorrect and needs fixing or the XDM should have been designed differently.

 

Frankly, this feels a lot like the "oh, we totally forgot that a product in Analytics actually has a category, so until we fix this in the schema, please use the productListItem's lineItemId as category?!?"-bug... I mean come on, this it's not like AA has been around since last year.

 

Hope this gets fixed at some point in the near future  

 

BR

Björn

 

Avatar

Correct answer by
Level 2

So after some ping-ponging with Adobe support, they checked internally and came back with this response

  • Close Case Comments: The query was productListItems SKU and name, and as per current logic, SKU is a required field. When using in WebSDK, the same value can be passed to SKU which is passed to name, since SKU is required one. 

In other words, they will adapt the documentation that the "SKU" is mandatory and if you want to use the "name" in the Analytics products string, you will have to set the value of the "name" in the "SKU" as well. Not ideal for people who want to use both a SKU and name but this is (at least currently) the way it is.


Case closed
Björn