Twitter is planning to lay off 9 percent of its global workforce, as the ailing San Francisco tech giant struggles to please Wall Street despite beating earnings expectations.

The company officially announced the cuts today in its third-quarter earnings, days after reports began to surface of the impending cuts. According to Twitter, the majority of the reductions will take place in its sales, partnerships and marketing divisions in order to "continue to fully fund our highest priorities," according to a letter to shareholders.

However, the earnings also came with some good news. Total monthly active users grew for the second consecutive quarter to 317 million users, gaining 4 million over the past three months since its second-quarter results. Daily active users also increased, rising 7 percent year over year.

Twitter's revenue totaled $616 million—an 8 percent increase year over year. Earnings per share totaled 13 cents, beating expectations of 9 cents per share and $606 million in total revenue. However, the company reported profit fell by $103 million.

Advertising revenue grew 6 percent to $545 million, with mobile now accounting for 90 percent of total ad revenue. U.S. revenue grew just slightly, increasing 1 percent to $374 million year over year, outpaced by international ad revenue, which grew by 21 percent to $242 million. Revenue from data licensing and other revenue also grew, increasing 26 percent year over year to $71 million.

Ad engagements also increased, growing by 91 percent year over year, with cost per engagement decreasing 44 percent year over year.

In a statement, Twitter CEO Jack Dorsey said the company's strategy is driving increased audience size and engagement, both in terms of monthly and daily users, but also in terms of tweet impressions and time spent.

"We see a significant opportunity to increase growth as we continue to improve the core service," Dorsey said. "We have a clear plan, and we're making the necessary changes to ensure Twitter is positioned for long-term growth. The key drivers of future revenue growth are trending positive, and we remain confident in Twitter's future."

Noah Mallin, head of social at MEC North America, said Twitter's progress might be going even better than it appears on Wall Street. But it might take some time to tell.

"What it seems like to me, first of all, is that Twitter is in the midst of a transformation," Mallin said. "And it's on every level. There's a business transformation, and I think, sadly the layoffs are part of that. There's an advertising transformation, and I think the surprise of the numbers going up points to the fact that it's taking hold. And I think theres a transformation in terms of how people are using the platform."

Some of MEC's clients have already begun advertising through Twitter's live video offerings, such as ad-supported livestreams of NFL games and presidential debates. Mallin said that has provided pleasing results for the brands that have tried it out. He said live video is likely to grow as awareness grows both on the advertiser and user fronts. (On the quarterly earnings call this morning, Twitter chief financial officer Anthony Noto said the company will introduce new syndicated video from partners such as NBA, NHL and Bloomberg in the fourth quarter.)

Others are less optimistic about Twitter's progress. According to Janice Suter, director of social media at GSD&M, Twitter is still playing catch-up with its competitors.

"Twitter can't touch the deep interest and behavior targeting capabilities that Facebook offers," she said. "And from a user perspective, the continuing lack of direction and understanding of what Twitter stands for is turning people away in favor of channels with more unique and compelling experiences, like Snapchat."

Brand advertisers remain the largest contributor to the company's overall revenue, Twitter said, with promoted tweets containing video beating other ad formats in terms of generating the largest share of revenue. Revenue from promoted tweets that lack video continued to decline.

Twitter said it plans to continue improving the users' timeline with machine learning, which the company said helps with both timeline relevance and also with increasing relevant notifications to drive engagement.

"We continue to work on optimizing the efficiency of our ad platform," according to the letter to shareholders. "This quarter, we were pleased to realize a higher overall revenue yield quarter-over-quarter. We achieved this at meaningfully reduced ad loads compared to the previous quarter, including on US home timelines."

Mallin said Twitter is still struggling to define what it wants to be: Is it a media company, is it a news organization or is it something altogether different? He said that lack of identity might have been what caused some companies to bow out of bids for a potential acquisition of Twitter earlier this month. (Reportedly interested companies have included Google and Disney.)

"I think some of the whole thing that happened where you had Disney and all these other folks look at them and then pass isn't because there isn't value there," Mallin said. "I think Twitter is tremendously valuable. I just think you can't really define them in a way that puts them in a box. So when shareholders of Disney or shareholders of Google look at it, they can't just say they're buying a media company or they're buying a social platform. Because Twitter really is its own unique beast."