Traditional U.S. brick-and-mortar retailers were hit hard in 2017, closing a record 8,053 stores in what has been called a “retail apocalypse,” Business Insider says. Radioshack, Payless, Ascenta, and Walgreens led the list of retailers with the most stores closing. Last year’s record closings topped the previous record set during the Great Recession in 2008, when 6,163 stores closed. Credit Suisse had predicted as early as last April that as many as 8,640 stores would ultimately close last year. While closings fell short of this total last year, they continue to rise, with chains such as Sears, Kmart, and Macy’s already announcing additional closings this year.

Industry experts see competition from online ecommerce rivals such as Amazon as the main culprit behind the decline of brick-and-mortar retailers. But traditional retailers are fighting back, in many cases successfully. Here are three strategies retailers are using to stay alive and survive the retail apocalypse.

Keep Prices and Product Pages Competitive With Online Rivals

One reason retailers are losing out to ecommerce rivals is price. Over five in 10 consumers visit stores to research products before buying online, a practice known as “showrooming,” according to the Retail Dive Consumer Survey. However, 85 percent of consumers still prefer to shop in stores where they can see and touch products and receive assistance from in-store associates, TimeTrade research shows.

This means that stores have an opportunity to win a significant percentage of customers away from online rivals if they can attract showrooming shoppers. Many showroomers only buy online because they can find the same product elsewhere at a different price. Amazon undercuts other retailers buy using a price matching engine to automatically compare and adjust its prices. But brick-and-mortar retailers can also use price matching to counter Amazon’s price matching strategy.

A key to doing this is effectively is implementing an ecommerce optimization strategy that keeps your prices on your product pages competitive with Amazon and other retailers. In order to do this efficiently, you need an ecommerce product page optimization platform, which makes it easy for you to monitor prices and product descriptions for all your online content from a single interface. Content Analytics, for instance, allows you to analyze how your product pages are performing, and split-tests different versions of them to improve and make them more competitive against online rivals.

Support Click and Collect Shopping

TimeTrade’s research also found that over a third of consumers don’t like waiting for items they purchased from online retailers to ship. This is one reason Amazon places such a high priority on fast shipping, to offset this disadvantage of the ecommerce business model. Brick-and-mortar retailers have an inherent advantage over ecommerce rivals when it comes to shipping.

One way traditional retailers are leveraging this to their advantage is offering “click and collect” shopping options. Click and collect allows customers to buy items online from your brand but then come to your physical location to pick up their order. For customers, this eliminates unwanted shipping wait time. For retailers, it provides an opportunity to make additional in-store sales. Over eight out of 10 customers who buy a product through click and collect will make additional purchases when they come to pick up their item, International Council of Shopping Centers research shows.

Offer Incentives to In-Store Customers

Click and collect is one example of how brick-and-mortar retailers can compete with ecommerce rivals by offering benefits that online shopping can’t provide. Highlighting the ability to see and touch products before purchase, the availability of on-site staff to answer product questions, and the enjoyment of the in-person shopping experience are some other ways stores can offer incentives to customers to shop in-store.

Retailers can also encourage customers to shop in-store by offering exclusive personalized discounts to customers in stores. Over six in 10 Millennial shoppers say they’re willing to trade personal information for a more personalized in-store shopping experience, Salesforce says. Stores can deliver personalized offers to in-store shoppers on their mobile devices by using tools such as beacon marketing. Beacon marketing lets you send in-store customers who have downloaded your app personalized offers based on their shopping history and their location in the store. You can also make personal offers during the check-out process as an incentive for customers to shop in-store.

Ecommerce optimization, click and collect, and in-store incentives are three ways that retailers can compete against ecommerce rivals. Adopting these strategies can make you more competitive by delivering your customers many of the same benefits that attract them to ecommerce shopping while also offering them advantages they can’t find online.

Roy Rasmussen, coauthor of Publishing for Publicity, is a freelance writer who helps select clients write quality content to reach business and technology audiences. His clients have included Fortune 500 companies and bestselling authors. His most recent projects include books on cloud computing, small business management, sales, business coaching, social media marketing, and career planning.