Tech hardware is a notoriously difficult business. Companies that were once atop the world like Nokia and Motorola quickly saw favor shift in the direction of rivals like Apple and Samsung.

Google, reliant on online advertising for about 84 percent of revenue, has nonetheless chased the device business for years. Less than two years after buying the Motorola brand, with the promise of a rolling out a robust line of smartphones and other devices, it sold it in early 2014 for less than a quarter of what it paid. It also bought phonemaker HTC’s design team for $1.1 billion early last year.

Google’s latest plan to be a bigger hardware player, the purchase of fitness tracker Fitbit announced Friday, fits into what analysts say is a quixotic dream to climb the market share ladder with products like Pixel smartphones, smart speakers and Nest thermostats.

Analysts said the $2.1 billion acquisition will bolster Google’s nascent health-care business, providing it with valuable data about people’s waking (and sleeping) lives. Together with its Pixel smartphones and Android mobile phone software, Fitbit’s data can provide a nearly complete picture of users’ entire day.

That’s sure to help inform Google’s core advertising business, even though the company said it will not sell ads as a direct result of the Fitbit deal.

“This is about devices, not data,” said Google spokeswoman Heather Dickinson. “Devices are a different business model. We are buying Fitbit to help us in our hardware efforts. Here, the business model is primarily about selling devices and services, not advertising.”

Despite the billions Google has spent to get into hardware, the tech giant is still a small player in gadgets. Its Android smartphone operating software is in more than three times the number of global devices as Apple’s, but Google continues pushing its Pixel-brand phones, a laggard in market share. Advances in hardware like GPS and radar mean gadget makers are increasingly the gatekeepers for companies that make software for mobile phones. In terms of data collection, having customers using both the device and the operating system is akin to owning the mall rather than just the department store in it.

Pixel phones command just 5 percent of the U.S. market for smartphones, according to Strategy Analytics, far behind Apple and Samsung. Under Google’s stewardship, Motorola lost market share, falling to 6.6 percent in the United States in 2013 from 9.1 percent in 2012, according to ComScore data at the time.

Google’s attempts to get on people’s wrists have also included buying assets from watchmaker Fossil and an operating system for smartwatches that preceded even the Apple Watch.

Most observers were not convinced Google is in the deal entirely to sell devices. “This is not a hardware play,” said Ramon Llamas, an IDC analyst. “This will feed into both companies’ health-care strategy and fill in data gaps.” He noted Fitbit collects data like hours of sleep, heart rate and steps taken — information that is otherwise difficult to amass.

He said Google and others have long envied the success of Apple, in particular, in marketing devices that consumers are passionate about. Amazon, for instance, took a run at the smartphone business with little success, forcing a $170 million write-down in 2014. (Amazon CEO Jeff Bezos owns The Washington Post.)

Fitbit faces its own uphill battle. At the end of last year, Fitbit commanded just 12 percent of the smartwatch market, compared with 50 percent for Apple, which launched its Apple Watch in April 2015. And Fitbit appears to be losing favor with consumers, including weak sales of its touted Versa Lite device. Fitbit has been discounting devices to drum up business and earlier this year lowered its financial expectations for 2019, signaling a shift to a reliance on paid health-tracking subscriptions.

What’s more, Fitbit has said it has just 28 million active users, suggesting that about three-quarters of the 100 million devices it has sold end up in dresser drawers. Its shares topped off at nearly $48 in July 2015 but plunging to $4.31 before rumors of a Google deal emerged.

Jen Ralls, a Fitbit spokeswoman, declined to comment.

Apple is expected to keep leading the way in the market for wearable devices, which is expected to keep growing. Gartner estimated it will jump 27 percent next year to $52 billion in total. Google said it will release “Made by Google” branded devices as a result of the acquisition.

The two companies already have some agreements in place. Fitbit stores data with Google’s cloud-computing unit and was using Google’s software to help connect its data to medical records storehouses used by doctors and hospitals.

“Google is uniformly bad at consumer products in our view,” said Wedbush analyst Michael Pachter. “We expect a Google-controlled Fitbit to remain entrenched well behind Apple’s watches and other inexpensive competitive products,” he said in a note to investors, adding that Google’s smart speaker sales were unimpressive.

Indeed, Google’s Home smart speaker devices are a distant second in market share at 25 percent to Amazon’s 70 percent, according to Consumer Intelligence Research Partners.

Google has broad ambitions in health care. It funds three divisions — Calico, Verily and DeepMind — that aim to detect and prevent diseases through software and medical devices and to extend life spans, among other ambitions.

Google promised it will not use Fitbit data to target its advertising and said users can delete their histories stored with Fitbit.

That wasn’t enough for Jason Gannon, 45, of Anderson, Ind. Within hours of hearing the news of Fitbit’s sale planned sale to Google, he said he destroyed his Alta device and canceled his account with the company. “I am depressed,” said Gannon, who has relied on Fitbit for sleep and step tracking for about two years. “I can’t trust Google with my data.”

He said he’d consider buying an Apple Watch instead because he believed the company has better privacy standards.

Others noted that Google made similar promises following its acquisition of Nest, maker of smart thermostats. At the time, Google said home data would "not go into the greater Google or any of its other business units.”

But it has since integrated Nest into its Assistant home automation unit and required users to create Google accounts to continue using their thermostats. The company has said the switch is necessary to allow Nest devices to function in tandem with Google services and provide a single log-in.

The deal will face an uphill battle in Washington. It will face bipartisan regulatory scrutiny particularly in light of ongoing antitrust investigations from nearly every state attorney general and the Justice Department. Despite a relatively smaller market share in wearables, Google with Fitbit would control an even bigger trove of consumer data, meaning it could further tailor targeted advertising, considered the most lucrative means of reaching people online.

“Why should Google be permitted to acquire even more companies while they’re under DOJ antitrust investigation?” tweeted Republican Sen. Josh Hawley. And Rep. David N. Cicilline (D-R.I.), the chairman of a House committee on antitrust issues, called for “an immediate and thorough investigation” of the Fitbit deal.

“It’s time for anti-trust enforcers to do their jobs instead of keeping us all under the rule of monopolies,” tweeted Rep. Katie Porter (D-Calif.) after news of Google’s deal was released.