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.
Solved! Go to Solution.
Views
Replies
Total Likes
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
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
Views
Replies
Total Likes
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
Views
Replies
Total Likes
@jkm-disco @yuhuisg Thanks for answering my question. I followed the @jkm-disco answer.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies