(Reuters) - Twitter Inc TWTR.N on Friday reported better-than-expected second-quarter revenue as design changes to its microblogging website attracted more users and advertisers, sending its shares up 10%.

Twitter’s revenue and number of users have been in focus since the social media platform started deleting millions of spam or fake accounts promoting hate speech or spreading political misinformation, contributing to declines in monthly users through 2018.

Chief Executive Officer Jack Dorsey said the platform saw an 18% drop in reports of spammy or suspicious behavior across all Tweet detail pages, which show the replies to any given Tweet on the service.

The company reported a rise in monthly active users in the first quarter, fueling speculation that Twitter was returning to growth, but has since stopped disclosing its MAU count.

Instead, this quarter it reported monetizable daily active usage (mDAU), a metric it created to measure only users exposed on a daily basis to advertising on the site and exclude those who access Twitter via aggregating sites like TweetDeck.

Its monetizable daily active usage (mDAU) hit 139 million, beating analyst expectations of 135 million, according to IBES data from Refinitiv.

“The strong growth in monetizable daily active users shows that Twitter users are sticking with the platform, and that should resonate with advertisers,” eMarketer senior analyst Jasmine Enberg said.

Dorsey said machine learning improvements to deliver more relevant content helped drive up this count. “We approach every problem now with technology first, and that has been a pretty marked shift within the company,” he said.

Twitter’s revenue rose 18% from a year earlier to $841 million, beating Wall Street expectations of $829 million, based on Refinitiv data.

FILE PHOTO: People holding mobile phones are silhouetted against a backdrop projected with the Twitter logo in this illustration picture taken September 27, 2013. REUTERS/Kacper Pempel/Illustration/File Photo

Total advertising revenue rose to $727 million, an increase of 21% year-on-year, as the company continued to improve its ad platform and formats.

Twitter has continued to bulk up its live and on-demand video content partnerships. On Thursday, NBCUniversal said they would team up to livestream parts of the 2022 Olympic Games, Twitter’s latest move in a series of deals aimed at boosting sports conversation on the platform.

It also expanded its multimedia features, launching a Snapchat-style camera feature in the Twitter app and releasing its own long-awaited tool for clipping and publishing video.

Twitter also recently updated its policies on hateful conduct directed at religious groups and last month introduced a new policy to de-emphasize and label rule-breaking tweets from important sources like politicians, though this has not yet been used.

WEAK FORECAST, HIGHER EXPENSES

However, Twitter forecast third-quarter revenue between $815 million and $875 million, the midpoint of which was below analysts estimates of $869.3 million, partly due to ending some older ad formats.

Total operating expenses, including cost of revenue, rose by 21% to $766 million, partly due to plans to hire more employees and reiterated that operating expenses would grow about 20% in 2019.

Twitter's results come against the backdrop of regulatory scrutiny against big tech and social media firms like Facebook Inc FB.O, Alphabet Inc GOOGL.O and Amazon.com Inc AMZN.O.

Twitter has also constantly been in the spotlight due to U.S. President Donald Trump’s prominent use, as well as criticism, of the platform.

Twitter reported second-quarter profit of $1.1 billion, or $1.43 per share, compared with $100 million, or 13 cents per share, a year earlier. Profit was boosted by an income tax benefit of over $1 billion related to corporate restructuring.