(Reuters) - Action-camera maker GoPro Inc’s first-quarter revenue beat expectations and it reported a smaller-than-expected loss on Thursday, benefiting from aggressive marketing of its cameras and controlling expenses.

A GoPro camera is seen in this illustration photo January 9, 2018. REUTERS/Thomas White/Illustration

The company recently exited its Karma drone business to stem losses and has been trying to attract consumers with promotional offers, new entry-level products and trade-up programs.

GoPro - whose cameras are used by surfers, skydivers and other action junkies — got a boost from higher sales of its HERO5 and HERO6 cameras as advertising helped it clear inventory and draw more customers.

“We experienced solid demand for our HERO6 Black and HERO5 Black cameras, which accounted for over 60 percent of our camera units and dollars shipped in the quarter,” Chief Financial Officer Brian McGee said on an earnings call with analysts.

Shares of the company rose as much as about 7 percent in extended trading, but pared those gains. The stock has dropped about 35 percent this year.

“Our recent increase in marketing is beginning to have a positive impact on sell-through,” Chief Executive Officer and Chairman Nicholas Woodman said on the call.

The company kept a tight leash on costs even as it pushed harder on advertising. Total operating expenses fell nearly 24 percent to $119.7 million.

GoPro had said in January that it would be willing to partner with a larger sector player, but that it was not actively engaged in a sale.

It launched a cheaper HERO in March and announced a “trade-up” program in April where users can exchange an older GoPro or any other digital camera and get discounts on the HERO6 or Fusion.

Wedbush Securities analyst Alicia Reese believes the results of these programs are likely to show up in the second quarter. “It appears that GoPro didn’t have to discount as heavily in Q1 as in Q4 to reach its target revenue.”

The company forecast current-quarter revenue between $260 million and $280 million, above analysts’ average estimate of $239.69 million.

The net loss narrowed to $76.3 million in the quarter ended March 31 from $111.2 million a year earlier.

Excluding items, the company lost 34 cents per share, compared with the average analyst estimate of a loss of 37 cents per share, according to Thomson Reuters I/B/E/S.

Revenue fell 7.4 percent to $202.35 million. Analysts had expected revenue of $184.2 million.