Startup companies are coming up with new technologies, such as “digital pills,” aimed at getting people to take medicine only as directed.

Taking medication haphazardly – skipping doses, lapsing between refills or taking pills beyond their expiration date – has been linked to health complications and hundreds of millions of wasted dollars for insurers and hospitals.

“After six months’ time, only half of people taking prescription medicines are taking them as directed,” said Troyen Brennan, chief medical officer of drug retailer CVS Caremark Corporation.

Health insurers and pharmacy-benefits managers like CVS have long relied on robo-calls, mailers and face-to-face meetings with pharmacists to keep patients on their dosing schedule.

Now they are evaluating a range of more cost-effective technologies, from pills and bottles with digital sensors, to data analytics software and social games that offer patients rewards.

Insurers and pharmacies are motivated in part by Medicare, which offers financial rewards for to their members who have improved their overall adherence to a medication schedule.

CVS is pilot-testing technology from Virginia-based RxAnte Inc., which sells an analytics platform that looks at millions of patients’ claims data and clinical data to identify people who have a high risk of failing to comply with doctor’s orders. These patients include people with a spotty track record of adherence, those who take several different medicines or those facing unwanted side effects, Chief Executive Josh Benner said.

“It’s all a targeting game,” Mr. Benner said. “We predict individual behaviors, and suggest interventions.”

Other companies are coming up with ways to help entice, rather than badger, customers. San Francisco-based Mango Health Inc. just released an app that lets users earn points toward prizes – such as gift cards from Target Corp. or a charitable donation in the patients’ name – for adhering to their prescription schedules.

Beyond data and apps, startups are working on digitizing the pills and bottles themselves.

Proteus Digital Health Inc. places tiny, digestible sensors inside of pills to get an objective accounting of who is taking what medicine.

The sensors are the size of a grain of sand and are made up of copper, magnesium and silicon, amounts well below a human being’s recommended daily allowance of such minerals, said Andrew Thompson chief executive of the Redwood City, California company.

The sensor beams data such as when the pill was ingested to a disposable strip worn on the skin like a Band-Aid that sends the data to a mobile app. With patient permission, doctors or loved ones can access the phone app to track compliance.

“There is no radio, no antenna,” Mr. Thompson said. “It’s literally powered by you.”

Mr. Thompson said the first digital drugs will be available in 2014 or early 2015.

Proteus, which is backed by Medtronic Inc., Otsuka Pharmaceutical Co., Novartis AG, Kaiser Permanente and venture firms, has licensing and commercialization deals with Otsuka and Novartis, he said.

Mr. Thompson said that sensor-embedded pills are appropriate for older patients, who often take multiple medications, and for sufferers of conditions like tuberculosis, where going off a medication regimen can have disastrous consequences.

Other companies are remaking the medicine bottle. AdhereTech Inc. is developing an automated pill bottle filled with sensors that measure how much medicine is left.

The bottle glows blue when it is time to taka a dose, and red when the dosage is missed.

The bottle can also beam data to AdhereTech’s servers and send text alerts as reminders.

Even product-design firm IDEO is thinking about ways to boost prescription adherence.

IDEO designers Kuen Chang and Jin Ko have designed a pill bottle that begins to resemble an overripe banana with black spots all over it once a medicine is past its expiration date.

The bottle is in concept stage and hasn’t been developed.

“It produces a gut reaction,” the husband-and-wife team said.

“Without thinking about it, you just really don’t want to eat that banana.”