(Reuters) - Chipotle Mexican Grill Inc's CMG.N aggressive push into online orders, amped up ads around fresh ingredients and the addition of healthier meals helped the burrito chain post its highest sales growth at established restaurants in over two years.

FILE PHOTO: The logo of Chipotle Mexican Grill is seen at the Chipotle Next Kitchen in Manhattan, New York, U.S., June 28, 2018. REUTERS/Shannon Stapleton

The company provided an upbeat sales forecast for the rest of the year, signaling it was turning the corner from a series of food-safety lapses since 2015.

Shares rose 3.7% late on Tuesday, adding to the 71% gain for the year and setting them up for a new record on Wednesday.

Over the past few years, Chipotle has unleashed a number of initiatives including partnering with delivery services such as Doordash and revamped its menu to win back customers.

The efforts have paid off. Sales at restaurants open for at least 13 months jumped 10% in the second quarter, their biggest increase since the first quarter of 2017. Analysts had estimated an 8.3% rise.

“Everything that Chipotle is doing is working,” BTIG analyst Peter Saleh said. “It’s driving the topline and that is putting them in the driver’s seat on the market side.”

Online sales nearly doubled in the second quarter, and accounted for 18.2% of total revenue, up from 15.7% in the preceding quarter.

Online-only options such as “Lifestyle Bowls”, healthier meals that include paleo, keto and vegan salads, also pulled in more customers.

Chipotle rolled out nationally a points based loyalty program in March, further incentivizing customers to buy more burritos and tacos and also allowing the company to promote tailored deals and menu items.

“Chipotle Rewards” now has over 5 million members, Chief Executive Officer Brian Niccol said in a conference call with analysts.

“It’s a driver of same-store sales, not just for the next year but for many years to come,” Saleh said.

Chipotle said it spent about 3.3% of revenue on marketing in the latest quarter, up from 2.5% in the preceding quarter.

But margins improved to 21% in the quarter, beating estimates of 20% as the company raised prices.

Chipotle said it expected full-year same-restaurant sales to increase in the high-single digit percentage, compared with the prior mid-to-high single digit range estimate.

Revenue rose 13.2% to $1.43 billion, beating estimates of $1.41 billion, according to IBES data from Refinitiv.

Excluding items, the company earned $3.99 per share, topping of estimates of $3.76.

Chipotle said it recorded $20 million for estimated loss contingencies related to legal proceedings, including a government investigation into its 2015 food safety lapses.