Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

dinesh_kumar_r
Level 4
Level 4

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
yuhuisg
Correct answer by
Community Advisor
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
yuhuisg
Correct answer by
Community Advisor
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

dinesh_kumar_r
Level 4
Level 4
Thanks for the answer. Can we configure s.products variable through the AA admin console ?
jkm-disco
Level 5
Level 5

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

dinesh_kumar_r
Level 4
Level 4

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