The front page of the BMWi remote app shows you the total mileage driven (& in-car obviously) and if you side swipe left into the statistics page and then hit the 'electric distance' box it shows you how many of those miles have been driven electrically.
Tracking the fuel consumed is straightforward for the petrol but for the leccy I don't think the car or app records it so you have to do that manually. That's easy enough from home (provided you have a meter installed alongside your charger) but when charging publicly it obviously gets more complicated due to the different charging points and networks.
As for electricity used, the average of kWh per 100km is available as is the total miles. If you ignore the inefficiency of charging the battery you can calculate the total kWh used, and therefore the cost. Someone who has a meter on their charging point should be able to tell us the extra power used in charging the battery that is not available when you discharge
I don't really trust the average miles/kWh number in the app because it got reset when I had my firmware upgraded so I have doubts about it's accuracy for the total mileage (although it's probably ok if you haven't had firmware reset).
As for the charging losses, I've been recording that and the average figure I'm seeing is 17.1% (which doesn't include any cabin pre-heating). So that means that a full charge of the battery is 18.8x1.171 = 22.0kWh.