Do you have metrics with multiple currencies? Here’s one way to convert them in real time on your metrics.
In your metric, add a new report and select Custom Rest API for the data source.
In the Data Settings for the new report, enter the following:
Note: The default base currency in fixer.io is Euros (EUR). But you're in luck! You can modify the base currency to the currency by using the following Parameter:
Check the Advanced options box, and make sure the Request method is set to GET. You will also want to check the Rotate table data checkbox.
If you press connect, this will give you the following response in your table:
Then, by using a substring, we can extract the
date line and column A to just the three-letter currency code.
In the builder, you can clean up the table of data by adding a SQL transform and enter the following SQL query:
SELECT SUBSTR(`success`,7,3) as currency, `true` as conversion_value
WHERE success NOT IN ('timestamp', 'base', 'date')
And that should give you a chart similar to this:
This will allow Grow to match up the currency conversion in this report with the currencies in your original report.
To finish this out, go ahead and use a Joined Report to join the two and display the converted currencies with your original data.
And that’s it! You’re good to go.
Questions? Email us at firstname.lastname@example.org or chat in on the site.