Target reported earnings, revenue and same-stores sales on Wednesday that topped analysts’ expectations for the second quarter, fueled by a jump in online transactions.

With more shoppers returning to its brick-and-mortar stores and ringing up purchases on Target.com, the discount retailer raised its outlook for 2017, as signs appeared that its turnaround efforts are making progress.

Shares of Target were last climbing around 3 percent on the news.

Here’s what Target reported compared to what Wall Street was expecting, based on a Thomson Reuters survey of analysts:

  • Earnings of $1.23 a share, adjusted, compared with a forecast profit of $1.19 per share.
  • Revenue was $16.43 billion versus an estimate of $16.30 billion.
  • Same-store sales climbed 1.3 percent, better than the expected 0.7 percent growth.

“We are pleased that second-quarter traffic increased more than 2 percent, reflecting growth in both our store and digital channels,” CEO Brian Cornell said in a statement.

“We continue to focus on our long-term strategy. … While our recent results are encouraging, we will continue to plan prudently as we invest in building our brands, our digital channel, the value we provide our guests and elevating service levels in our stores.”

Target’s second-quarter revenue increased 1.6 percent from a year ago, to $16.43 billion.

Net income fell to $672 million, or $1.22 per share, in the second quarter, from $680 million, or $1.16 per share, during the same period last year. Excluding one-time charges, the big-box retailer earned $1.23 per share.

Sales from Target stores open more than 12 months rose a better-than-expected 1.3 percent, following a year of declines and amid growing skepticism about the retailer’s turnaround efforts.

Meantime, Target’s comparable digital sales jumped 32 percent. The retailer has also been making heavy investments online.

“This continues to be a challenging, competitive … environment [and] that’s why we’re particularly pleased by the ongoing progress we saw on the second quarter,” CMO Mark Tritton told analysts and investors on Wednesday’s earnings conference call.

Tritton said Target saw market share gains across all discretionary categories during the period, including apparel and home, though comps in Target’s food business remained flat. Sales of produce and adult beverages continue to be bright spots for this segment, he added.

“While we believe Target has much further to go before the grocery business is fully fixed, we applaud the start it has made in turning around this challenging part of the operation,” GlobalData Retail Managing Director Neil Saunders wrote in a note to clients.

Though Target reported a slight decline in the average shopper’s ticket for the quarter, far more shoppers were seen making “quick trips” or “fill-in trips” this period, the company said.

Looking ahead, Target has updated its outlook for the third quarter, now expecting to earn between 75 cents and 95 cents a share. Analysts were calling for third-quarter earnings per share of 77 cents, according to Thomson Reuters.

For the full year, Target has forecast earning between $4.34 to $4.54 per share. Analysts polled by Thomson Reuters had called for earnings per share of $4.39 in 2017, falling on the lower end of Target’s updated range.

From here, a focus on executing new merchandising, and…