What happened

Shares of Twitter (TWTR) climbed 21.2% in July, according to data from S&P Global Market Intelligence, after the short-form social networking site delivered stronger-than-expected second-quarter results.

To be sure, after drifting higher early in the month leading up to its July 26 earnings release, Twitter stock soared 8.9% after its results hit the wires. When all was said and done in Q2, revenue had increased 18% year over year to $841 million, translating to net income of $0.20 per share after adjusting for one-time items. The top and bottom lines easily outpaced consensus estimates at the time for adjusted earnings of $0.19 per share on revenue of $829 million.

Multiple teenagers sitting on a park bench using their smartphones.

Image source: Getty Images.

So what

CEO Jack Dorsey emphasized the company's work to improve the health of its platform: "Our focus was on ensuring that our rules, and how we enforce them, are easy to understand. We also continued our work to proactively identify and address malicious behavior, resulting in an 18% drop in reports of spammy or suspicious behavior across all Tweet detail pages, which show the replies to any given Tweet on our service."

Twitter also highlighted its continued use of machine learning to improve the relevance of content seen by users. In turn, the company saw its average monetizable daily active users grow 14% year over year -- accelerating from 11% in the first quarter -- to 139 million. 

Now what

Twitter also told investors to expect third-quarter revenue between $815 million and $875 million, the midpoint of which is modestly slower 11% year-over-year growth and technically falls below consensus estimates for $869 million. Partly to blame for that soft outlook, according to management, was the company's decision to deprecate some older legacy ad formats to better serve customers.

Of course, it's hard to blame Twitter for working to keep its advertising client base happy. And given its relative outperformance in the second quarter, at least judging by last month's rally, it seems the market was more than willing to forgive the move.