We write analytics software. Recently our customers have asked us to take a look at expanding our services into the e-commerce arena, and this has raised some tricky questions in an internationalized world.
The root of our questions is that a store may process transactions in multiple currencies. Imagine a list of transactions that looks like this:
- transaction #2789, 2015-01-05: 2,400 USD
- transaction #2790, 2015-01-07: 600 EUR
- transaction #2791, 2015-01-08: 150 GBP
- transaction #2792, 2015-01-09: 1,200 USD
Suppose we want to show the total lifetime revenue as it changes over time in a graph. What's the most appropriate variable to graph? Some of the options we're considering:
The total for one currency only. Since most of the time and for most stores, the majority of the revenue comes from one currency, only show that currency. This sidesteps the issue entirely by assuming that people will be fine with looking at one currency at a time and seems to make the fewest number of assumptions.
In this case, the lifetime USD revenue for the four transactions above would be 0 USD before January 5, 2400 USD on January 5, and 3600 USD on January 9. The EUR and GBP transactions would just be ignored when calculating for USD; likewise, the GBP and USD transactions would be ignored when calculating for EUR.
The total for all currencies, normalizing to USD via today's exchange rate to the current value of those currencies. If 1 EUR = 1.1 USD and 1 GBP = 1.5 USD, then the lifetime revenue would be 4,485 USD. However, this means that the total revenue would change every time you look at the graph, since exchange rates are always changing.
The total for all currencies, normalizing to USD via the exchange rate at the time the transaction was made. This is the same as above, but now we use the exchange rate at the time the transaction was made instead of at the time the graph is being generated, so the total revenue is stable rather than fluctuating each time exchange rates move.
What's the right approach? Should we pick one or try to build all three -- and if we pick one, which one do we do? Or is there another viable option we're missing entirely?