Retailers had strong sales for the holiday season.

Black Friday and Super Saturday were the biggest days for overall spending.

Numbers were boosted by a rise in electronics sales and online shopping.

Retailers had a very happy holiday.

Retail sales from November 1 through Christmas Eve were up 4.9% over last year, according to data from Mastercard SpendingPulse. That's the highest rate of growth since 2011.

That number was given a strong boost by online sales, which were up 18.1% over the season. Much of this growth was due to the new ease of shopping online later in the season, as more last-minute shipping options have become available. Last year, online sales grew 18.9%.

"This year was a big win for retail," Sarah Quinlan, senior vice president of market insights at Mastercard, said in a statement. "The strong US economy was a contributing factor, but we also have to recognize that retailers who tried new strategies to engage holiday shoppers were the beneficiaries of this sales increase."

Mastercard compiles data from both online and offline stores, using every type of payment.

In terms of overall spending, Black Friday and December 23 — also known as Super Saturday — were the biggest days. Strong sales on Black Friday gave an early indication of a merry holiday for stores, but earlier promotions in November also helped boost sales for the season.

Mastercard saw "significant jumps" in the first three weeks of the month, according to a press release from the company. Online sales from November 1 through 22 totaled almost $30.4 billion this year, accounting for nearly 18% year-over-year growth, according to Adobe Analytics.

Electronics and appliances saw a 7.5% jump in sales, boosted by a growth in smart home products like the Amazon Echo and Google Home, according to Mastercard. That's the largest increase in electronics sales in a decade.

Home furnishings and home improvement saw a 5.1% increase in sales. Apparel sales grew only 2.7%, and women's clothing sales were flat. Last-minute shoppers flocked to jewelry stores, and sales of jewelry were up 5.9%.

The holiday season — a bright spot in a difficult retail climate — isn't over yet. The after-Christmas sales have just begun, and billions more are to be returned and spent at retailers over the next week.