_ti non-standard currency

Hello and Happy New Year guys,

So after last years implementation of the browser tracker, JS tracker, Native iOS and Android i’ve arrived at our loyalty offering. While it’s fair to say our loyalty ‘credits’ are worth a monetary value EUR/USD etc they aren’t in that form on the front end.

I’ve noted that changing the _ti (additem) expect currency to a value that isn’t a currency, say ‘abc’ for example fails validation and goes to bad stream. I have the full open exchange API enabled btw.

I did testing on localhost like this:

<!-- tracker/collector/contexts/pp/pv/... all prior

//_tr stuff

//item test

window.snowplow('addItem',
    'IE1234',           // order ID - required
    'DD44',           // SKU/code - required
    'Acme item',        // product name
    'Green Medium',   // category or variation
    '75000',          // unit price - required
    '1',              // quantity - required
    'abc'             // currency, check....
  );

window.snowplow('trackTrans');

Does a currency code exist that is not traditional that bypasses? or any suggestions?

Thanks
Kyle

1 Like

So there’s a reserved code for non-currency transactions (XXX) but that isn’t going to help you much in this case as Open Exchange rates is going to fail if you try to convert anything from it.

Given that addItem will take contexts I’d instead setup your own context to track gift cards that you can then attach to this call rather trying to squeeze it into the existing ecommerce implementation.

Cheers Mike,

A context seems to be the way forward for this indeed. I’m all about white label approach so I was trying to avoid forking the code base from the default engine as this would be a partner(s) specific contexts.

I also did not want to drop _tr and _ti events as I’ve everything already configured for reporting/analysis, so i’ll just need to default the total/unit to 0.00 and input the country currency code, while expanding for the new context.

Maybe it’s a roadmap item at some point in the future, and I would exactly call it critical just something to be considered for addTrans, addItem, AddToCart, RemoveFromCart like what if Bitcoin or Ripple gets accepted in the future. I’d like something a little more global than add more contexts in. Maybe add a couple of accepted characters like BTC, XBT, XRP, then one global for the client, it can stay XXX but needs to not flow through Open Exchange if not an accepted currency for exchange… anyway back of a match box thoughts for now.