Framework for tracking activities on wearable devices