Consumer review website operator Yelp (YELP) reported an unexpected second-quarter profit and raised its full-year revenue forecast as investments in sales and marketing led to more businesses and consumers signing up for its services.
The company’s shares rose more than 8% in extended trading. They hit a 52-week high in regular trading on Tuesday.
Yelp posted a net profit of $449,000, or one cent per share, for the three months ended June 30, compared with a net loss of $1.3 million, or two cents per share, a year earlier.
Analysts were expecting a loss of seven cents per share, according to Thomson Reuters.
Yelp, whose website and app allow users to rate restaurants and a variety of other businesses, said net revenue rose 29.5% to $173.4 million.
Analysts were expecting revenue to increase to $169.8 million.
Yelp has been spending heavily to stay competitive in a market that includes everyone from heavyweights such as Alphabet’s Google (GOOGL) and Facebook (FB) to smaller rivals such as GrubHub (GRUB) and start-ups like TaskRabbit.
That helped Yelp’s local advertising accounts increase 32% to 128,000 in the quarter, roughly in line with analysts average estimate of 128,100, according to FactSet StreetAccount.
Subscribe to Data Sheet, Fortune’s daily newsletter about the business of technology.
Yelp’s mobile app was accessed by 23 million unique devices on a monthly average basis, up 27% from a year earlier.
The San Francisco-based company raised its full-year 2016 revenue forecast to $700 million to $708 million from $690 million to $702 million.
Yelp said it also partnered with and made a small investment in Nowait, a mobile platform that allows restaurants to manage their waiting lists.