Former New York City mayor and 2020 Democratic presidential candidate Mike Bloomberg speaks at a rally on January 15, 2020 in New York City.

Presidential candidate Mike Bloomberg's campaign spending on Google ads has surged past President Donald Trump's and is right on his heels when it comes to Facebook ads.

Data compiled by the digital tracking company Acronym shows that Bloomberg, who entered the race just over two months ago, has spent more than $18 million on ads on the popular search engine, while Trump's campaign has doled out at least $12 million on the same platform since May 2018.

The news comes as Trump has begun lashing out at the former New York City mayor. Trump recently took aim at a Bloomberg spot that he claimed was a form of "false advertising" when it comes to his handling of health care as president.

Bloomberg's prodigious ad spending has helped him get to fifth place in the Democratic primary, behind former Vice President Joe Biden, Sens. Bernie Sanders and Elizabeth Warren and former South Bend, Indiana, Mayor Pete Buttigieg, according to national polls.

It's also helping him to connect with voters while he skips the debates and makes campaign stops across the country.

His Google ads have been collecting, at times, millions of views. Bloomberg's ad on leadership has over 20 million views and has made 10 million impressions, according to Google's transparency report. A Google impression is registered on a link when the URL appears in a search result.

Tweet:

The Google ads include at least two spots that target Trump's efforts to repeal and replace President Barack Obama's signature health-care law, also known as Obamacare, while claiming that many Americans have lost their health insurance during Trump's presidency.

"There are one million more uninsured Americans every year under Trump," says a Bloomberg clip that was published on Jan. 8.

Many of these ads are being created by Bloomberg's tech startup, Hawkfish, which has become the "primary digital agency and technology services provider for the campaign," as CNBC first reported. The digital ads have often targeted Trump's policies while promoting Bloomberg's candidacy.

Representatives for Bloomberg and Trump did not return requests for comment.

Meanwhile, it appears Bloomberg is trying to put pressure on Trump when it comes to a Facebook ad blitz.

Facebook's ad archive shows Trump's campaign has spent about $20 million on ads on the social media platform while Bloomberg's campaign has ponied up $10 million.

Acronym shows that Bloomberg's Facebook ads are targeting voters in California, Pennsylvania, Florida, Texas and Michigan. The campaign has said they believe they can win some of these states in the Democratic primary.

On Thursday, Bloomberg's campaign announced it has placed a team of senior political advisors in Michigan after a recent poll showed the former mayor with a seven-point lead over Trump in that state.

Billionaire Tom Steyer is ahead of Bloomberg when it comes to total Facebook ad spending, with an $18 million investment so far.

Over the last week, Bloomberg, who has a net worth of just over $59 billion, has spent $3 million on Facebook ads while Trump's two campaign committees have combined to spend just over $600,000.

Since Bloomberg entered the race in November, Trump's campaign has spent just over $4 million on Facebook ads.

On top of Bloomberg's guarantee that he will spend more than $100 million on digital ads that mainly go after Trump, he's also trying to beat Trump's spending on TV ads. Data compiled by Advertising Analytics shows Bloomberg has spent more than $204 million on TV ads, which so far surpasses all of the other candidates, including Trump.

Bloomberg's TV ad funding has led to a bump in prices within various markets. Advertising Analytics says the typical market saw rates jump by 22% as his political spending poured in. After he put up $1 million in Houston in November, the markets there saw a 45% increase.