People shop at the Macy's flagship store on 34th St. on Black Friday on November 23, 2018 in New York City.

Foot traffic at malls and stores across the U.S. this past holiday weekend wasn't as strong as last year, a retail tracking firm said Saturday, while a separate report suggested more consumers opted to shop online.

Preliminary data tracking shoppers' visits to physical stores Thanksgiving Day and Black Friday show a year-over-year decline of 1 percent, ShopperTrak said. Meanwhile, store visits Black Friday by itself were down 1.7 percent.

"We know that online sales ... has certainly eroded traffic from retailers over the years," Brian Field, senior director of advisory services for ShopperTrak, told CNBC. "But what we have noticed is that the decline is starting to flatten out." In 2017, for example, visits to physical stores Thanksgiving Day and Black Friday were down 1.6 percent.

Black Friday is still expected to be the busiest shopping day of the year, Field said, despite the small dip in visits to stores. He added that shopping was relatively evenly spread all across the country Thanksgiving Day and Black Friday, with no one geography seeing a stronger spike in traffic, despite cold weather blanketing much of the Northeast.

Like other analysts, Field also said he noticed heavier traffic on Thanksgiving Day in particular.

"There was a huge amount of traffic on Thanksgiving Day, but in a very concentrated time frame," he said. "It's from when that store opens until basically all of those hot commodity items are gone. ... Then it really calms down."

Meanwhile, online sales reached a record of $6.22 billion Black Friday, according to Adobe Analytics, while online sales Thanksgiving Day totaled $3.7 billion, up 28 percent from a year ago and becoming the fastest-growing day for e-commerce sales in history.

The ease of shopping from a computer at home or from a retailer's mobile app is enticing more shoppers to skip the store and buy online. But Adobe also called out this holiday weekend more consumers are opting to buy items online and pick them up in stores. This could entail foot traffic picking up later in the season, when shoppers come in to pick up items they've already purchased on the internet, and potentially buy more.

Additional "busy" shopping days this year, according to ShopperTrak, include the third Saturday in December, Dec. 15, and the Sunday before Christmas, Dec. 23.

Overall, the National Retail Federation is calling for holiday sales to climb within a range of 4.3 to 4.8 percent, which would be better than a five-year average of growth of 3.9 percent.