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

Revenue with no decimal places

VasconcelosAqui
Level 3
Level 3

Hello there, guys,

I have recently deployed one solution to adobe analytics for a client and on workspace the revenue is comming as integers and not as decimals. As if the values are beeing applied with Math.root and being round. Is there some configuration that I should do to get the numbers in decimal?

Please let me know if you faced that problem or have an solution to that.

1 Accepted Solution
Asheesh_Pandey
Correct answer by
Community Advisor
Community Advisor

You need to make sure when you parse revenue value as integer parseInt(), also use JavaScript toFixed() Method else it will only return integer values. This should solve your issue.

e.g.

revenueValue = 10.5266;

var revenueVariable = parseInt(revenueValue).toFixed(2);

s.products="Mens;Shoes;1;revenueVariable",

Thanks!

Asheesh

View solution in original post

4 Replies
ursboller
Community Advisor
Community Advisor

I don't think you can change the default metric... you can create a custom "calculated metric" which contains just the revenue event, and change to currency event & set the decimals as needed.

you might want to hide the original metric from the usage, best done in VRS by component curation.

Asheesh_Pandey
Correct answer by
Community Advisor
Community Advisor

You need to make sure when you parse revenue value as integer parseInt(), also use JavaScript toFixed() Method else it will only return integer values. This should solve your issue.

e.g.

revenueValue = 10.5266;

var revenueVariable = parseInt(revenueValue).toFixed(2);

s.products="Mens;Shoes;1;revenueVariable",

Thanks!

Asheesh

View solution in original post

harish_kumar
Employee
Employee

You may need to create calculated metric from Revenue metrics and set the decimal point . Standard Revenue metrics can not be changed.

jantzen_belliston-Adobe
Community Manager
Community Manager

If one of the replies above answers your question, please be sure to click the "Correct Answer" button on that reply. This will ensure others can quickly find the correct answer.

Thanks,
Jantzen