Target Corp. managed to avoid the shopping blues that have recently weighed on Macy’s and Nordstrom, but a slowdown in its online sales has raised new concerns.

Target’s online sales grew 20 percent in the third quarter, well below the ambitious 40 percent growth rate Target executives set as a goal for the next few years. It’s a slowdown from the 30 percent online growth Target posted in the second quarter and 38 percent in the first quarter.

For the fourth quarter, Target forecast online sales to continue that same 20 percent clip, even with a free shipping promotion on any size order through the holidays. That promotion helped drive a big boost in online sales last year.

“We believe Target is making the right investments and improving its online presence, but the slowing digital sales growth is discouraging,” said Sean Naughton, an analyst with Piper Jaffray.

That’s one reason investors weren’t feeling celebratory about the Minneapolis-based retailer’s 1.9 percent growth in same-store sales in the third quarter — or profits that fell in line with expectations. The company’s stock fell 4 percent by the end of Wednesday to $69.78 after it reported results for the August-to-October quarter.

Naughton noted that other retailers have seen a recent drop-off in online growth. On Tuesday, rival Wal-Mart reported 10 percent growth in online sales in the most recent quarter, down from the 21 percent growth it posted in the same period a year ago.

The pace at which traditional retailers like Target can make digital sales a bigger part of the revenue mix is considered a sign of long-term competitiveness with online specialists like Online sales currently account for about 3 percent of Target’s revenue.

A recent report from Wells Fargo said that Amazon has been picking up market share in the last year, capturing about 36 percent of all retail growth so far this year in North America, not including fuel, vehicles and food.

On Wednesday, Target Chief Executive Brian Cornell suggested that analysts take the online slowdown in context. The National Retail Federation expects online sales to grow between 6 and 8 percent this holiday season.

“We’re seeing an overall slowdown in digital growth across retail,” he said. “And we’re really pleased that we continue to outpace the industry.”

He added that 80 percent of Target shoppers start their shopping journey by looking up deals and products online before they step into a store, so its digital channel influences in-store purchases in a way that may not show up in digital sales numbers. In the end, he said, it’s up to consumers how and where they want to shop.

“What we’re seeing right now is they are voting with their feet to spend more time in stores,” he said.

Target saw store traffic grow 1.4 percent in the quarter, its fourth consecutive quarter of positive store traffic.

Still, Target has been pouring millions of dollars into upgrading its online capabilities, such as rolling out ship-from-store services. This holiday season, the retailer expects 40 percent of online sales to be fulfilled by a store rather than a warehouse. In doing so, the retailer has been shaving a day or two in delivery speed. It also recently opened two new fulfillment centers.

Matt Nemer, an analyst with Wells Fargo, said he doesn’t necessarily view Target’s deceleration in online sales as a bad thing.

“It’s not clear to me that higher growth is better because we know that e-commerce growth is less profitable,” he said. “I’d rather have [shoppers] swipe their credit cards in the store than online.”

In the third quarter, Target reported adjusted earnings per share of 86 cents, in line with analysts’ expectations and up from 79 cents a year ago. Net profit grew 56 percent to $549 million, chiefly reflecting the elimination of losses from its now-closed Canadian stores. Revenue grew 2.1 percent to $17.6 billion.

“From a sales perspective, its results were pretty good given everything else we’ve seen at retail,” said Naughton.

Last week, Macy’s and Nordstrom reported big drops in quarterly sales, spooking investors and sending retail stocks tumbling. Those retailers blamed in part a warmer fall that has depressed sales of colder-weather apparel, which Target felt in the quarter, too.

But results this week have shown that it’s been an uneven retail landscape with Home Depot and Lowe’s reporting strong quarters. And Wal-Mart reported a respectable 1.5 percent increase in same-store sales in the United States.

Target saw a double-digit decline in electronics and a slowdown in apparel sales in the quarter. It saw a 12 percent increase in toy sales.

It also reported upticks in sales from recent efforts to overhaul its food offerings, with categories such as premium yogurt and craft beer showing high single-digit increases as Target has enhanced those assortments.

John Mulligan, who was promoted earlier this year to chief operating officer to help Target update its supply chain, told analysts that Target has already begun to see improved in-stock levels in the last couple of months since placing a bigger emphasis on it. For example, his team has managed to reduce out of stocks in household and baby items by 50 percent in the last two months, he said.

For the fourth quarter, executives forecast a 1 to 2 percent increase in same-store sales.

“As we head into the holiday season, we’re mindful that the consumer remains cautious and there are indications of heavy inventory levels at other retailers,” said Cathy Smith, Target’s new chief financial officer. “However we remain focused on the things we can control and what has been working all year.”

The company hasn’t set a closing date for the sale of its pharmacies to CVS, a $1.9 billion deal announced in June. Smith said the company is working with CVS to get regulatory approval and is pleased by the progress so far.