Ride-hailing giant Uber Technologies, Inc. continued its loss-making ways by posting a $8.51 billion net loss for all of 2019 compared to revenues of $4.07 billion.

Uber said the gigantic loss was primarily due to stock-based compensation. Uber lost $1.1 billion in the fourth quarter of 2019 alone, which is 24% larger than the $887 million it lost in Q4 2018. It plans to reach profitability by 2021. As for guidance, analysts polled by FactSet expected 2020 EBITDA at $2.84 billion.

Uber placed its loss per share (excluding certain items) for 2019 at 64 cents compared to the 68 cents per share as expected by analysts, according to Refinitiv.

Adjusted EBITDA (Earnings Before Interest, Taxes, Depreciation and Amortization) for all segments except Uber Rides all posted year-on-year losses.

Despite the full-year gloom, Uber's fourth-quarter earnings report on Thursday gave analysts cause to cheer. Uber reported a hefty 37% spike in revenue to $4.07 billion in Q4 2019 compared to Q4 2018, beating the average analyst forecast of $4.06 billion. The actual revenue growth was also faster than the 30% growth it posted last quarter. Uber's Q4 2019 revenue growth accelerated to 37% from 30% in Q3.

Uber Rides, the company's top segment delivered $13.51 billion gross bookings, up 18% but below the $13.60 billion estimate among analysts polled by FactSet. This amount included ride-sharing services and fees from drivers. Rides produced $742 million in EBITDA, up 281%.

Gross bookings from the Uber Eats segment (including payments from restaurant and delivery partners) stood at $4.37 billion, up 71% and above the $4.13 billion estimate.

"2019 was a transformational year for Uber and I'm gratified by our progress," said CEO Dara Khosrowshahi in a statement. "We recognize that the era of growth at all costs is over."

Part of Uber's travails in Q4 2019 was due to tighter regulations impacting its business in London and California and continued to slash costs. In November 2019, Uber lost its license to operate in London.

It laid off hundreds of employees in its marketing, recruiting, Uber Eats and Advanced Technologies Group, among others, in October. Uber now also has to contend with the impact from California Assembly Bill 5 or AB 5. This new law makes it harder for Uber to claim its drivers are independent contractors rather than Uber employees. The law took effect January 1.

The Supreme Court of California ruled that most workers are employees and ought to be classified as such. It said the burden of proof for classifying individuals as independent contractors belongs to the hiring entity. AB5 entitles workers classified as employees to greater labor protections such as minimum wage laws, sick leave and unemployment and workers' compensation benefits. These protections don't apply to independent contractors.

In December, Uber sued California, aiming to have AB 5 declared invalid.