Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Not getting the total price of the product ( rate * quantity), instead getting only unit price passed in the s.products string

Avatar

Level 5

Hi Team,

 

Please help me here.  In the s.product string contains skuID, unit price & quantity firing on the order confirmation page along with purchaseID & purchase event. However on the revenue metrics I am seeing only the unit price instead of total price value. So can you please help me how to get the total price in the revenue metric & what all ways to solve it.

 

s.products = ";abcd;100;12";

Revenue metrics reports value = 100(unit price)

Units metric = 12

 

I am looking for total price of the product, revenue should report value = 1200.  Any help.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You need to track the total price x quantity in the s.products string. So in your example, it should be

s.products = ";abcd;1200;12";

Reference: https://docs.adobe.com/content/help/en/analytics/implementation/vars/page-vars/products.html

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

You need to track the total price x quantity in the s.products string. So in your example, it should be

s.products = ";abcd;1200;12";

Reference: https://docs.adobe.com/content/help/en/analytics/implementation/vars/page-vars/products.html

Avatar

Level 5
Thanks for the answer. Can we configure s.products variable through the AA admin console ?

Avatar

Level 6

Hi @dinesh_kumar_r , as implied in the referenced link, s.products is configured in code (before it reaches Adobe's tracking servers and the report suite configurations). Either the developers are setting this value directly in external javascript or it is being set by your tag management (DTM or Launch). If you just want to patch the problem you could do something along these lines:

 

 

 

var product_array = s.products.split(";");
var unit_price = product_array[2];
var product_qty = product_array[3];
var total_price = unit_price * product_qty;
product_array[2] = total_price;
s.products = product_array.join(";");

 

 

 

However, if it is set incorrectly on the developer side, you may want to ask them to fix the initial setting of s.products

Avatar

Level 5

@jkm-disco @yuhuisg  Thanks for answering my question. I followed the @jkm-disco answer.