According to conversations with over two dozen staffers and advertising experts involved with the data and advertising operations of both presidential campaigns, the Democratic party's data machine that worked so well in 2008 and 2012 may have ended up working against Hillary Clinton in 2016. Here's what the campaigns did:

Like Clinton, the Democratic campaign's digital strategy was disciplined and precise. They were methodical, using data to acutely target voters who were pegged as most likely to vote or most likely to be swayed.

Like Trump, the Republican campaign's strategy was unpredictable and opportunistic. They were experimental, especially on Facebook, using data to identify wider sets of potential voters and to target broader audiences that weren't necessarily pegged as definitive or persuadable voters.

Why it matters: The Clinton campaign's data-driven media and communication tactics may have been too precise amid an unusual media climate against a nontraditional candidate. Conversely, the Trump campaign's reliance on intuition over data drove their message to people and places they would've never otherwise reached, like white, male voters in Wisconsin and Michigan — the voters that delivered his victory.

Campaign structure:

Per a former Clinton party official:

The Clinton campaign was run like a management consulting firm. The Trump campaign was run like a family business.

The Trump campaign's main data source came from the RNC, which worked with a third-party firm called Data Trust. The relationship between the RNC and an independent group, not a campaign, is what many from the Trump campaign credit for their electoral success. After their 2008 loss, Data Trust and the RNC began to create an infrastructure that could support any future nominee. "Our theory is Democrats created a machine designed to market one product — Obama. If we can design a system that can market any candidate, not one specific candidate, we think we can leapfrog the competition," Data Trust adviser (and former Reince Priebus chief of staff) Mike Shields said about their strategy.

came from the RNC, which worked with a third-party firm called Data Trust. The relationship between the RNC and an independent group, not a campaign, is what many from the Trump campaign credit for their electoral success. After their 2008 loss, Data Trust and the RNC began to create an infrastructure that could support any future nominee. "Our theory is Democrats created a machine designed to market one product — Obama. If we can design a system that can market any candidate, not one specific candidate, we think we can leapfrog the competition," Data Trust adviser (and former Reince Priebus chief of staff) Mike Shields said about their strategy. The Clinton campaign's main data hub was split between the DNC and the campaign itself, not a third party that could cultivate data across cycles. Groups like Catalist, Civis, Organizing for Action and the DNC all housed at different times different pieces of the data that Obama used to target voters in 2012. Sources say the Clinton campaign worked with the DNC to cultivate and model a data pool that had been fragmented after Obama's 2012 win, making it harder for the Clinton campaign to compete with the GOP's long-term strategy.

Targeting strategy: One of the biggest differences between 2012 and 2016 was the increased domination of Facebook and Google, which made micro-targeting through paid advertising on both platforms a significant part of each campaign's strategy.

The Clinton campaign used micro-targeting to focus on a specific group of persuadable voters, while the Trump campaign identified persuadable voters and advertised to broader, related groups.

One of the biggest lessons of this campaign is you can't get by with small, targeted audiences.

— Google's Head of Industry - Elections, Lee Dunn

Mass-message testing: