Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!

Currency Conversion for eVar variables

Avatar

Level 1

Hey everyone,

 

I am trying to keep a standardized currency, USD, within the eVars & events that I collect. Events do get converted by specifying currencyCode if defined as a Currency type, but eVars don't, as they can only be defined as a Text String or Numeric.

Would anyone know of a way to convert values within Adobe to match the currency code, whether through an extension, or custom code, or would it have to be done on the data layer side, making sure any data pushed up is already converted to the standardized currency?

Thank you!

2 Replies

Avatar

Community Advisor and Adobe Champion

Unfortunately, Adobe only stores dimensions (props, eVars, lists, etc) as text... even the "numeric" designation you mentioned doesn't change how the values are stored, it really only opens up options for tracking.

 

For example, when an eVar is set, and the value persists, you don't necessarily know what the previous value is. However, if you need to track an incremental number (to be used a dimension breakdown within your reports), numeric allows you to do something like:

 

s.eVarX = "+1";

 

This will mean on the first instance of eVarX, the value will be "1", the second time, the value will be "2"... but the values are still stored as a string.

 

So you can track currency in an eVar, but it will always be stored as text. There is no way to change that.

 

That said, if you need to track the currency into an eVar (and have it match the converted currency), I think your only option is to set up a VISTA rule with the Adobe Engineering team.. this will come at a cost, since you need to work with the engineers... but they should be able to create a rule to pass the revenue or currency based event into a dimension for you... I can't see any other way to do this..  Processing Rules don't have access to the purchase revenue, and they don't allow for setting a dimension based on an event (on top of that, there is no guarantee that the conversion has even taken place when Processing Rules are run, it very well might be done in the next step - it probably is after this anyway, since if the value was being set by context variable, processing rules would be used to set it to the event... conversion would have to take place after this).

 

If you had CJA, you could make a dimension from an event, or an event from a dimension.... but nothing like that exists in Adobe Analytics... sorry.

Avatar

Community Advisor

Fully agree with Jennifer on that one. eVars are non-numeric string values that live in the rows of your table. There is little dynamic about that.

You could ask your developers to perform a calculation by the the time the eVar is generated and set that resulting value.

 

But bear in mind that this will be a multiplication with a likely static currency exchange rate that may change unless the devs retrieve the current exchange rate through an API like this https://www.exchangerate-api.com/

Cheers from Switzerland!