As the Democratic candidates for president spent 2019 battling each other in early voting states, Donald Trump’s re-election campaign built a sophisticated social media machine to communicate with conservative voters, grow its email list and fine-tune its messaging.

Over the course of 2019, the Trump campaign spent nearly $20m on more than 218,000 different Facebook ads, a new Guardian analysis shows. Among the ads were some of the images and videos that made front-page news for their xenophobic, fear-mongering, vitriolic and outright false rhetoric.

But the campaign also ran a decidedly mundane social media campaign featuring classic marketing ploys designed to harvest user data. Considering the fact that the campaign has run these ads – which are largely substance-free and appear designed to maximize engagement with simple requests – over and over again, they were probably very effective.

Trump’s prowess on Facebook has struck fear in the hearts of Democrats. The architect of his 2016 digital campaign, Brad Parscale, boasted of the sophistication of his Facebook operation, and was promoted to campaign manager for 2020. “The campaign is all about data collection,” Parscale told the Guardian. “If we touch you digitally, we want to know who you are and how you think and get you into our databases so that we can model off it and relearn and understand what’s happening.”

In order to understand how Trump is communicating with Americans on Facebook in the 2020 election cycle, the Guardian built a database of all 218,100 campaign ads launched by the Trump campaign in 2019, using the Facebook political ad archive application programming interface, or API. The analysis is the most comprehensive of the Trump re-election campaign’s Facebook advertising to date.

On Facebook, Trump is vastly outspending his Democratic rivals. The top-spending Democratic candidate, Tom Steyer, spent $16.8m on just 12,704 ads on the platform over the course of the year. The former South Bend, Indiana, mayor Pete Buttigieg came closest to matching Trump’s volume of advertisements, with 74,286 distinct ads.

Of the hundreds of thousands of Facebook ads the Trump campaign ran in 2019, the most successful could reasonably be described as the most boring.

“TAKE THE OFFICIAL APPROVAL POLL!” reads the ad copy, which sits above a portrait of Trump. “Please take the Official Trump Approval Poll before 11:59 PM TONIGHT to have your vote counted in the official results.”

The “Official Approval Poll” ads send Trump supporters to a “job performance survey” designed to collect email addresses. This particular format – two sentences of copy atop one of a handful of portraits of Trump – garnered at least 48.9m “impressions”, a metric that refers to the number of times an ad is shown to users. The campaign launched hundreds of versions of the ad every few days – 3,578 total – between October and December, the “11:59 PM TONIGHT” deadline notwithstanding.

Facebook Twitter Pinterest Examples of the most popular Facebook ad format for Trump’s 2020 campaign. Photograph: Facebook

Any analysis of Facebook ads is limited. They are just one aspect of a political campaign, and the messages that work on the platform do not necessarily reflect more than “what works on Facebook”. The data that Facebook provides through its API is also limited. While campaigns may consider dozens of factors when deciding what group of voters to target with an ad, Facebook only provides researchers and journalists with broad demographic and geographic information about the age and gender group within which the ad performed best (ie that an ad received 17% of its impressions from men aged 45-54 and 22% of its impressions in Texas).

Facebook also only provides spending and impression data for each ad as a range. According to Facebook’s data, 158,909 (or 72%) of the ads that Trump’s campaign ran in 2019 were seen by between zero and 999 Facebook users. This imprecise range means that in aggregate those ads could have garnered anywhere from 0 to 158m impressions.

Facebook has also made it difficult to analyze the “creative” element in political ads. Facebook ads are constructed like Facebook posts that a normal user might publish, with a block of text (the “copy”) above a photo or video and link to another page. The Facebook API allowed us to download the ad copy for all 218,100 Trump ads, but not the photos or videos. These can only be viewed through individual URLs, which it provides in a format that requires the use of an “access token”. Scraping the creative from 218,100 URLs was beyond our technical capacity.

Still, the analysis provides new insight into what messaging the Trump campaign chose to invest in and what makes Trump voters tick – and click.

Facebook Twitter Pinterest Trump campaign merchandise ads. Photograph: Facebook

A year of Facebook ads

The Trump campaign spent $19.4m on 218,100 different Facebook ads in 2019, which were seen between 633m and 1.3bn times.

The campaign did not come up with 218,100 completely different messages . Instead, as with the “official approval poll” ad, it ran hundreds of minor variations of a smaller number of distinct ads. We found 1,840 distinct versions of ad copy, of which the campaign ran anywhere from one to more than 3,000 versions. The variations within a specific tranche of ads are visible in some cases (ie when there are differences in the photo or video accompanying the ad copy) but not others (ie if the only difference is based on the campaign’s targeting choices).

While Trump ran ads on Facebook throughout the year, there was a marked increase as the impeachment inquiry ramped up in the fall. The campaign’s single largest day of Facebook ad spending ($317,362) was Friday 27 September – the day after the Ukraine whistleblower’s complaint was released. The second and third most expensive days were 20 and 21 December – the Friday and Saturday after he was impeached by the House of Representatives. The fourth was 14 November, the day after the impeachment hearings began in the House.

Issues and enemies

If you tried to deduce the issues of most importance to American voters from the president’s Facebook ads, you would think that the number one concern to voters was not healthcare (as poll after poll shows), but the supposed malfeasances of the mainstream media. The media and its “fake news” are mentioned in 18.25% of the Trump’s 2019 ads – more than any other issue. Trump’s signature issue – immigration and a border wall – comes second, followed by impeachment, the economy, gun rights and the supreme court.

Actual policy proposals and initiatives appear far less frequently, though the campaign did run very small tranches of ads about the First Step Act, paid family leave, “health care choice”, and, interestingly, animal cruelty. Not a single ad mentioned the climate crisis or the environment.

Facebook Twitter Pinterest Trump campaign ads about animal cruelty featured images of cute animals. Photograph: Facebook

Political enemies and grievances are a common feature of Trump ads. The campaign ran 10 times as many ads that mention the phrase “witch hunt” as ads that mention terrorism, and nearly as many ads warning against “socialism” as ads about his own plans for trade or the economy.

Many ads also single out political rivals by name, with the speaker of the House, Nancy Pelosi, being the most commonly cited (and attacked), followed by the Senate minority leader, Chuck Schumer; chairman of the House intelligence committee, Adam Schiff; and frequent rightwing bogey-women: the US representatives Alexandria Ocasio-Cortez and Ilhan Omar.

Relatively few of Trump’s ads mention his potential 2020 Democratic opponents, though Elizabeth Warren, Joe Biden, Bernie Sanders and Beto O’Rourke were all mentioned in some ads by name. Warren, who is referred to by two different spellings of “Pocahontas”, was mentioned the most, and the earliest.

Americans may have grown used to Trump’s coarse language on Twitter and at his rallies, and his campaign has injected significant doses of his signature invective into his Facebook advertisements.

In addition to slurring Warren as “Pocahontas” or “Pocohontas”, he refers to Sanders as “Crazy Bernie” and Biden as “Sleepy Joe”. Pelosi is frequently called “a liar and a fraud”; Schiff is “Little Adam Schiff” or “Schifty-Schiff”; the Democratic congressman Al Green, who was an early advocate for impeaching Trump, is “Low-IQ Al Green”; and congressional Democrats in general are the “Do-Nothing Democrat Savages”.

Many video ads feature voiceovers from Trump warning of frightening if absurd eventualities, such as one in which he claims the Democrats are “openly encouraging millions of illegal aliens” to “destroy our nation”. At times, Trump’s voiceovers border on incoherent: “They have these witch-hunts, they have all nonsense, and you know what, people are wise to it, and that’s why our poll numbers are so high,” he says in one video.

Ads about immigration use especially dark rhetoric and imagery, stoking fear of “caravan after caravan” of migrants or urging voters to vote yes or no on whether to “deport illegals”. An ad that ran after the impeachment inquiry began used images of Joseph Stalin, Fidel Castro and members of the fringe group the Revolutionary Communist party burning an American flag to suggest that Democratic candidates were “destroying American values”. “Only one man can stop this chaos,” the ad announces, before Trump appears under blue skies.

Facebook Twitter Pinterest Trump campaign ads about immigration. Photograph: Facebook

Click, click, click

But it’s not just doom, gloom and fearmongering. Many of Trump’s ads are the kind of cheerful, patriotic marketing that one would expect from a discount furniture showroom’s Fourth of July sale. These ads may not be getting under the skin of Trump’s Democratic rivals, but they appear to be helping to drive the re-election campaign’s substantial fundraising.

Facebook ads are designed to induce online actions, and almost all of the Trump campaign’s ads are clearly intended to produce one of four: donating money, attending a rally, buying campaign merchandise, or providing the campaign with a user’s email address or mobile phone number.

To achieve these ends, the campaign appears to be using some of the most basic and click-inducing marketing tricks, which have little if anything to do with presidential politics.

Of those ads that seek to garner contact information, for example, huge numbers involve a contest of some kind. The Trump campaign ran 5,551 Facebook ads promoting contests to win two signed hats – the “one millionth Make America Great Again hat” and the “first Keep America Great hat”. Other contests include meals with Trump at various campaign stops.

The campaign also ran more than 30,000 ads asking supporters to sign various “cards” for the Trump family – for Donald’s birthday, for Melania’s birthday, for Christmas, Valentine’s Day, Thanksgiving, and the new year.

Surveys similar to the “Official Approval Poll” were also a common form of data harvesting, with users encouraged to click on a wide range of simplistic but apparently appealing questions:

WILL YOU CHOOSE TRUMP OR A DEM IN 2020?

TRUMP NY TIMES ACCOUNTABILITY SURVEY

TRUMP CENSORSHIP SURVEY

SHOULD TRUMP BE IMPEACHED? YES OR NO?

SECURE THE BORDER? YES or NO?

PRESIDENT TRUMP SOCIALISM POLL

IS THE MEDIA FAIR TO THE PRESIDENT?

The political campaign version of an irresistible BuzzFeed quiz, the surveys take users to a form where they must enter their email addresses or mobile phone numbers to record a response.

Ads urging donations use language to inspire a sense of urgency – and frequently contain promises that donations will be “matched”. At various times throughout the year, the campaign has run ads promising that donations would be “double-matched”, “triple-matched”, “quadruple matched”, and even “5x-matched”. Frequent references to “deadlines” bear no relationship to the actual Federal Election Commission’s reporting deadlines.

Examples of Trump ads urging his supporters to donate money to his campaign Examples of Trump ads urging his supporters to donate money to his campaign

Another strategy for gathering emails is an appeal from Trump to “add your name” to various petitions or lists, often with the message that Trump is planning to read the list, and “he’ll be looking for your name”.

The more emails and phone numbers the Trump campaigns gathers, the less it will have to rely on Facebook to reach these voters.

A sign for the future?

The limited data made available by Facebook makes it impossible to tell just how sophisticated the targeting of Trump’s ads is.

But one small tranche of ads launched at the very end of 2019 could provide a preview of targeted attack campaigning. Between 22 December and 29 December, the Trump campaign ran video ads targeting 10 members of the House of Representatives by name – exclusively within their home states (and probably within their congressional districts). All 10 are Democrats first elected in 2018, and all represent districts that voted for Trump in 2016. The message: your representative’s vote for impeachment is “nullifying your vote”.

The campaign’s investment in the ads was relatively small – around $20,000. Still, in each of the 10 congressional districts they were seen by at least 20,000 people – far greater than the margin of victory in each representative’s 2018 election.

Will Facebook make the difference?

The contrast between Trump’s Facebook ads and those of the Democratic candidates is stark. Healthcare, climate change, college affordability and other bread-and-butter issues for Democratic voters dominate Democrats’ messaging – which is often designed to persuade rather than inflame.

The candidate whose Facebook campaign could rival Trump’s is the former New York City mayor Mike Bloomberg. After entering the race in late November, the billionaire immediately invested in a massive campaign on the platform, spending more than $6m on 16,260 ads – and racking up more impressions (more than 500m) than his primary rivals garnered over an entire year of campaigning.

Bloomberg’s campaign appears to be mimicking some aspects of Trump’s campaign, running hundreds of minor variations on similar ads and aiming to inflame viewers’ anger with negative ads about Trump. In January, he even started running a tranche of ads featuring cute, imperiled animals.

Facebook Twitter Pinterest Mike Bloomberg is also running Facebook ads about imperiled and adorable animals. Photograph: Facebook

Whether these tricks will translate into victory remains to be seen. But the idea that Trump’s Facebook ads were determinant in 2016 was recently endorsed by the executive who oversaw Facebook’s ad business at the time, Andrew Bosworth.

“Was Facebook responsible for Donald Trump getting elected?” he wrote in a leaked memo. “I think the answer is yes, but not for the reasons anyone thinks. He didn’t get elected because of Russia or misinformation or Cambridge Analytica. He got elected because he ran the single best digital ad campaign I’ve ever seen from any advertiser. Period.”