US regulators have approved the first pill that contains a digital tracking sensor to alert doctors and caregivers as to whether a patient is taking the medication as scheduled.