OTTAWA -- Canadian consumers flocked to online shopping as the measures to combat the COVID-19 pandemic were enacted, according to a Statistics Canada report.

A new report from the agency found that total retail sales fell by 17.9 per cent as Canadians increasingly sheltered in place between February and May and brick-and-mortar stores closed their doors.

Even so, shoppers rushed to make online purchases, with sales surging 99.3 per cent during the period.

Statistics Canada says e-commerce sales hit a record $3.9 billion in May, a 2.3 per cent increase over April and 99.3 per cent increase over February.

E-commerce sales more than doubled year over year, with a 110.8 per cent increase compared with May 2019.

The report found that all 11 retail subsectors with e-commerce sales saw those sales increase.

The record gains in e-commerce occurred as total retail sales experienced record declines, the report says, with April data showing the most stark contrast. Retail sales that month plummeted to $33.9 billion, down 29.1 per cent from February and 26.4 per cent from the prior year. Meanwhile, e-commerce increased 63.8 per cent in April.

From February to April, only the food and beverage subsector saw an increase in in-store sales, which were up 3.3 per cent, while e-commerce sales surged 107 per cent. In-store sales declined for general merchandise stores, building material and garden equipment and supplies dealers, and health and personal care stores.

Other retail trade subsectors such as furniture and home furnishings stores, sporting goods, hobby, book and music stores, and clothing and clothing accessories stores saw much sharper declines in in-store sales from February to April 2020. As in-store sales decreased for these subsectors, e-commerce sales increased.

Statistics Canada said it will continue to update the e-commerce data to assess the long-term changes after the pandemic, noting that as stores reopened in May, the proportion of e-commerce sales was 10 per cent, down from a record high of 11.4 per cent in April.

"Will the COVID-19 pandemic have a lasting impact on the retail trade sector? Small businesses are increasingly turning to e-commerce platforms, and are using these platforms in innovative ways," the report said.

The new data from Statistics Canada is the latest peek into a changing retail sector, also reflected in two other recent data releases. The consumer price index, released on July 22, suggested that consumer behaviour has shifted so much that it has thrown off the inflation index.

Overall retail sales data for May, released on July 21, indicated that while about 23 per cent of retailers were closed during the month, for an average of five business days, sales are 80 per cent recovered from the worst of the pandemic period.

This report by The Canadian Press was first published July 24, 2020