Twitter, Inc. (NYSE:TWTR) finally got out of its rut last year.

In what seemed to be a combination of low expectations coming into the year and solid steps toward the end, Twitter finally gave its investors a win, climbing 47% in 2017. Twitter limped into the year with a slew of problems, including rampant harassment, stalling user growth, and a perception that it was difficult to use.

Over the last year, product improvements, President Trump's embrace of the platform, an increased appetite for news, and smart business decisions have led to a renewed sense of optimism for the stock as it approaches profitability. Let's take a look at the year that was for the social media platform.

An illuminated Twitter bird logo next to a window

Image source: Twitter.

A better product

Unlike rival Facebook (NASDAQ:FB), which has a clear purpose and easy-to-understand interface, Twitter has long confounded new users with its character limit, syntax use (with @ signs and hashtags), and even the basic question of how best to use it. However, the company made several key advances in its product last year.

First, like its peers including Facebook and Snap Inc's(NYSE:SNAP) Snapchat, the company is hosting more video. In the first quarter of 2017, it aired 800 hours of live video, and by the third quarter it had live-streamed 830 events.

Increasing video adoption helps keep users on the platform longer and builds on the company's brand of being about "live" communication. 

In the fall, the company made the controversial decision to expand its character limit from 140 to 280. Twitter has not reported earnings since then, but the consensus among users seems to be that it was the right decision. 

The increase in the character limit allows for clear communication, cuts down on the need for threads, and may even make the platform more civil by encouraging debate rather than pithy remarks. Towards the end of the year, the company also made it easier to post threads or so-called tweetstorms. 

Finally, though harassment remains a problem on the platform, the company took steps to curtail it, becoming stricter on things like hate speech and revenge porn.

A political tailwind

The election of Donald Trump was a gift to Twitter and newspaper companies. Shares of The New York Times Company (NYSE:NYT) and its peers spiked following the election of Trump, and subscriptions soared following his surprise victory and the ensuing polarized political climate. Many Americans seemed to believe that it was more important than ever to be informed about what was happening in the country and the world. Trump has embraced Twitter like no other politician, using it to make pronouncements and share controversial opinions. Essentially, he's served as an advertisement for the social network and an example of how newsmakers can use it, cultivating an audience and using it as a direct means of communication with the public. 

Twitter management played coy when asked about the President's impact on the business, with then-CFO Anthony Noto saying, "I would say that the President's use of Twitter has broadened the awareness of how the platform can be used, and it shows the power of Twitter," but still crediting Twitter's growth in the fourth quarter of 2016 to product changes and marketing.

Still, the increased attention to the news over the past year has been a clear benefit for Twitter.

The key metrics

As a result of the above factors, Twitter posted strong growth in key categories last year. Daily active user growth accelerated over the year, increasing 14% in the most recent quarter, which became the fourth quarter in a row with double-digit growth after a much more sluggish 2016. That DAU growth seemed to result in part from increased engagement with the news cycle. While revenue fell in each quarter on a year-over-year basis as ad prices dropped, engagement is soaring: ad engagements increased 99% in the most recent quarter.

Most importantly, the company is making steady progress on the bottom line. Adjusted net income rose by 25% in the company's most recent quarter, and management said it may report its first GAAP quarterly profit ever in the fourth quarter. For a business that had long seemed beyond repair, that was welcome news for investors.

Looking ahead to 2018, the company should benefit from the momentum from recent changes like the increase in character limits and the change in threads, which have improved the user experience. However, even if its DAU's continue to grow, the company needs to find a way to stem its falling ad prices. Competition with Facebook, Instagram, and Snapchat remains steep, and Twitter has acknowledged that the company's ad business remains "demand constrained."

Improving ad engagement and an increase in users could help the company persuade more advertisers of its value, but convincing them remains the company's biggest challenge. While Twitter's darkest days may be behind it, the road ahead is still challenging.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.