The practice has influenced canvassing and get-out-the-vote efforts for years. And it explains why campaign volunteers from both parties might knock on one door but skip the next three. If die-hard opponents live in those next three homes, it is more efficient for the volunteers to move on.

"Knocking on every door is old school," said Stuart Trevelyan, the head of Washington-based NGP VAN.

Gansler's modeling helped the campaign recognize that support was strong enough in portions of Southern Maryland that it could shift volunteers to other areas of the state, spokeswoman Katie Hill said. The campaign still connects with voters in Southern Maryland, but the effort is more likely to be by phone instead of in person.

Democratic candidates in Maryland have hired several digital firms that worked for Obama's campaign. Gansler, who supported Obama in the 2008 Democratic primary and went on to co-chair his campaign in the state, is relying on Clarity Campaign Labs to build its modeling, and is paying Blue State Digital for consulting, according to campaign finance reports.

Both firms worked with the Obama campaign, and the CEO of Blue State served as Obama's top digital strategist.

Blue State, with offices in Washington, New York and elsewhere, would not discuss what work it is performing for Gansler. Political director Matthew McGregor said statewide campaigns are far more equipped to target voters online and on the ground than they were four years ago.

The Baltimore-based Yuhas Group also worked on Gansler's model, the campaign said.

Mizeur hired Washington-based New Blue Interactive to run her campaign's digital strategy. Taryn Rosenkranz, the company's CEO, said it has also relied on modeling to place micro-targeted ads on Facebook and other social media sites.

Campaign finance records show that Craig has relied on a Washington-based firm, Aristotle, which can provide up to 500 consumer data fields that include information such as whether a voter scuba dives or gardens, and whether he or she is divorced.

The company would not say what work it is performing for Craig. Its chief marketing officer, Brandi Travis, said cost prevents most state campaigns from buying as much data for micro-targeting as presidential campaigns.

Among the Republicans, Hogan appears to be the biggest spender on digital campaigns, according to expenditure reports. In 2014, he has paid more than $16,000 to Facebook, for example. A spokesman for his campaign did not respond to a request for comment.

Overall, Republican candidates have raised less money and appear to be spending less on digital than the Democrats.

"We're in a competitive race, so we're making use of everything," George said, adding that his campaign will soon begin targeting online ads to certain types of users.

But no matter how valuable the techniques are for political campaigns, civil libertarians are concerned about the types of data being collected and what oversight is in place to protect privacy.

Christopher Calabrese, legislative counsel for privacy issues with the American Civil Liberties Union, said there is virtually no government regulation to guide the practice. The Federal Trade Commission noted similar concerns in a report last week focused on data brokers that sell personal information to private companies and campaigns.

"I think it does create some unintended problems for campaigns," Calabrese said. "It's feeding into this system of the profiling of each of us."

The extent to which consumer data is used by campaigns in Maryland is unclear. All three Democratic campaigns said they did not rely on consumer data beyond the public information that is already mixed into the analyses available from NGP VAN.

Paul Ellington, campaign manager for Craig, said he uses consumer data. But he declined to detail what datasets are being mined.

Campaigns answer privacy concerns in part by saying they aren't all that interested in whether a voter subscribes to Field & Stream, drives a Volvo or listens to U2 on a music streaming site. They don't even see that information. Instead, consultants plug dozens or hundreds of such factors into algorithms that build a composite picture of a voter.

Based on that, campaigns receive a score that predicts how likely a voter is to respond to a certain message or support a specific candidate.