Adobe ACP Mobile SDK - "&&& product" context data implementation | Adobe Higher Education
Skip to main content
Level 4
October 29, 2024
Répondu

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

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 

Meilleure réponse par 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 commentaire

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.

jaishalAuteur
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

jaishalAuteur
Level 4
January 31, 2025

While I am not an app developer, that doesn't look right...

 

The syntax of trackState only allows for two items... the page name, and the data object passing all the values as a single object... you have every value as a it's own item.

 

Example:

var dictionary = { }; dictionary["myapp.login.LoginStatus"] = "logged in"; ADBMobile.analytics.trackState("Home Screen", dictionary);

 

 

All of your items (signin.status, buyflow.name, etc) should be a part of the "dictionary" object. You can call it whatever you want, we just call ours contextData... but the principal is the same... 

 

If that is the actual code being used, I don't understand how it is working at all, that should just error out.

 

Now, ignoring the code issues with the trackState, that looks correct.. The events and product both look like they are properly formatted to me... 

 

Do you have AEP Assurance installed in your apps, so that you can see the data going to Adobe as well as the post-processed values? This is the best way to try and debug what is happening.. 

 

You said that the other data in that call was coming through?


Here is the screenshot from AEP assurance

 

&& events = purchase

 

For other events, we are passing : &&events = prodView and &&events =scCheckout . Looks that data is coming into Adobe. 

 

Does &&events = purchase fall into "Sales" Metric?