It was one of the hundreds of cute questionnaires that were shared widely on Facebook and other social media websites, like “which pokemon are you?” and “what are your most used words?”

This one, an app called “thisismydigitallife”, was a personality quiz, asking questions about how outgoing a person is, how vengeful one can be, whether one finishes projects, worries a lot, likes art, or is talkative.

About 320,000 people took the quiz, designed by a man named Alexsandr Kogan.

Kogan was contracted to do it by a company called Cambridge Analytica, founded by US Republican supporters including Steve Bannon, who would become the strategist for Donald Trump.

Because Kogan's app was circulated via Facebook, it reaped far more than just the information on those who took the test. At the time, in 2015, such apps could scrape up all the personal details of not only the quiz-takers but all their Facebook friends.

That ultimately became a horde of data on some 50 million Facebook users — their personal information, their likes, their places, their pictures, and their networks.

Marketers use such information to pitch cars, clothes, and vacations with targeted ads. It was used in earlier elections by candidates to identify potential supporters. But for Kogan and Cambridge, it was a much bigger goldmine. They used it for psychological profiling of US voters, creating a powerful database that helped carry Trump to victory in the 2016 presidential election.

The data let the Trump campaign know more than perhaps anyone has ever known about Facebook users, creating targeted ads and messaging that could play on their individual biases, fears and loves — effectively creating a bond between them and the candidate.

Psychometric profiling

The project was based on the work of a former Cambridge scientist, Michal Kosinski, who studies people based on what information they generate online.

Kosinski and fellow researcher David Stillwell had for several years tapped into Facebook for psychometric profiling using their own personality test app, “myPersonality”.

The app accumulated six million test results, along with users' Facebook profiles, and their friends' profiles, in a powerful research database.

In 2015 they published a study carrying the bold title: “Computer-based personality judgments are more accurate than those made by humans.” They showed, for example, that they could divine a fairly accurate psychometric portrait of a person using only their Facebook “likes”.

“Computers outpacing humans in personality judgment presents significant opportunities and challenges in the areas of psychological assessment, marketing, and privacy,” they wrote.

Kosinski would not share the database with Kogan and Cambridge Analytica, reportedly knowing it would be used for a political campaign.

But Kogan created his own app quiz and, through that, amassed the database on 50 million people that would be the backbone of Trump's social media campaign.

Facebook now says Kogan did that illegally. And it has since also restricted apps from such broad data collection on friend networks.

Powerful results

But Cambridge Analytica proved that Kosinski's methods were powerful. They started with the standard psychological profiling test known as Big Five or OCEAN, which measures five traits: openness, conscientiousness, extroversion, agreeableness and neuroticism.

The test-taker answers a list of statements like “I am someone who tends to be organized” or “who rarely feels excited” or “has few artistic interests,” using a scale from “strongly agree” to “strongly disagree”.

Those basic results were combined with the data raked from Facebook profiles and friend networks, associating longer lists of traits.

For example, to categorize voters, an algorithm could find links between “agreeableness” or “neuroticism” and gender, age, religion, hobbies, travel, specific political views, and a host of other variables.

The data generated an incredible 4,000 or more data points on each US voter, according to Alexander Nix, Cambridge Analytica's chief executive, before he was suspended on Tuesday.

The power of psychographic data, experts say, is not in the granularity itself, but in combining data to make significant correlations about people — something with requires powerful computer algorithms.

Ultimately, it allowed the campaign to know far more about voters than anyone ever has before. The output was put to work in what Nix called “behavioural microtargeting” and “psychographic messaging”.

More simply said, the campaign could put out messages, news and images via Facebook and other social media that was finely targeted to press the right buttons on an individual that would push them into Trump's voter base.

For Trump, it worked.

“If you know the personality of the people you're targeting, you can nuance your messaging to resonate more effectively with those key audience groups,” Nix said in a 2016 presentation.