Adobe ACP Mobile SDK - "&&& product" context data implementation | Community
Skip to main content
Level 4
October 29, 2024
Solved

Adobe ACP Mobile SDK - "&&& product" context data implementation

  • October 29, 2024
  • 1 reply
  • 4040 views

I have a ACP mobile sdk implementation using trackState and trackAction calls. Now the devs are sending data using "&&products": ";Category: infinite;Product: 160GB, Talk & Text - Plus;Quantity: 1;Price: 75.0". How do i populate it up in Adobe analytics? I tried mapping it to an eVar using processing rules but when in context data variable i typed : &&products it turned the value into products and it is not working. 

 

Please Suggest me the best solution as it is urgent 

Best answer by Jennifer_Dungan

ohh thank you so much for the information. But why are "Quantity" and "Price" is coming as  metric and not dimensions? I am just trying to understand the reasoning behind it. it is kind of difficult to create a view where we want to see cost and quantity of a particular product at the purchase

 


In the Products List notation, those are standard metrics. Even in your screen shot above from January, that was in the Success Events configuration. Revenue and number of items being sold are traditionally stored as a metric, so that you can have a total number of "product X" sold in whatever period, and a total revenue from those sales... metrics are numbers, so they will add up across the orders and you can also run calculated metrics on them... 

 

https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/page-vars/products 

 

If you want to be able to see these values as actual text dimension data (as in, you want to see a specific, locked in, textual value for each order), then you will need to create some Merchandising eVars to store the values as a dimension.

 

For example:

 

You might want to keep the default "visit" expiry, or you may want it to only be part of the Sale hit, or maybe have a custom expiry.. it depends on your needs.

 

But you will definitely need to make it "Merchandising" and in Product Syntax.

 

 

Now, in your products string, you will need to add the new eVars:

 

";CCMM42255:5G Infinite Premium;250;118.75;;eVar97=250|eVar98=118.75"

 

Notice I have a double ;; in the string, this is intentional... this is the spot where custom events would be placed, if you had any... since you don't, we need to leave that there and empty.

1 reply

FarazHusain
Adobe Employee
Adobe Employee
October 29, 2024

Not sure what AEC mobile SDK is, as we only have AEP and ACP SDK for Adobe Analytics. In case you're using native Android/iOS SDK you can follow this document - https://developer.adobe.com/client-sdks/solution/adobe-analytics/product-variable/

products is set directly on the image request and auto-mapped as far as I know in the above approach, and the other variables are set as context data.

jaishalAuthor
Level 4
October 29, 2024

i am not the receiving the data that the devs are passing:

 

Value passed:

 

 "&&products": ";Category: infinite;Product: 160GB, Talk & Text - Plus;Quantity: 1;Price: 75.0"

 

Value received for Android: 160 GB

No value received for iOS

jaishalAuthor
Level 4
October 29, 2024

The documentation is actually correct... it's just that they left out the optional category.. hence starting with ; instead of text. 

 

In your example, you are passing a category, so that needs to be the first value... but category is optional... in fact, everything except the Product Identifier is optional.

 

 

You will also notice that nothing in that notation has prefix text (same as the information I provided), my example is the same as the documentation, but with more of the optional fields provided to match up to your original ask

 

Going back to the documentation sample; when reading:

";Running Shoes;1;69.95;event1=5.5;eVar1=Merchandising,;Running Socks;10;29.99"

 

You would read this as:

 

Product 1:

  • Category = null
  • Product = Running Shoes
  • Quantity = 1
  • Price = 69.95
  • events
    • event1=5.5 (numerically passing "5.5" as the incrementor)
  • merchandising eVar(s)
    • eVar1=Merchandising (passing a literal "Merchandising" value)

 

Product 2:

  • Category = null
  • Product = Running Socks
  • Quantity = 10
  • Price = 29.99
  • events = null
  • Merchandising eVars = null

 

 

 

When it comes to the optional field, Category is not mandatory, but I like it because I use Products list for 20 different things (not all related to purchases) due to the ability to have merchandising elements...  I use Category to denote the use as opposed to an actual category for the product.... but in a simpler implementation like yours, I might use category for actual product related data.

 

Quantity and Price should only exist on a purchase (and even then, it's only needed IF you want your Revenue Report to work... you can make a purchase without these), and neither Merchandising Events or eVars are mandatory...

 

But if you are sending those values, they need to be formatted correctly, and sent in the proper notation.


Thanks for the response jennifer.

Also wanted to confirm if i want to get Product ID(SOC ID) as well along with category, product, category, price. How it needs to be parsed as it is available from an API respons.e 

On web, we are getting this value this value under Products: IP16PM256GLD:iPhone 16 Pro Max 256GB Desert Titanium

How do we get this value in App under Products?