This article originally appeared on Forbes.com

The vast majority of retail sales still occur at a physical location. Despite this fact, traditional brick-and-mortar retailers are getting squeezed from multiple directions by crushing debt obligations, over-extended real estate portfolios and e-commerce sales siphoning away their loyal customers. No retailer seems to be immune, with Macy’s, NordstromSearsJCPenney and Toys ‘R’ Us all facing store closures and, in some cases, bankruptcy.

Toys ‘R’ Us is one retailer currently in bankruptcy but planning to keep its stores open. Unfortunately, it faces an uphill battle to win back waning customers in a saturated marketplace. Not only must it recapture audiences from retail competitors but also from the e-commerce behemoths. To do that, it’ll need to win the battle for more and better data. The ability to take advantage of location data presents one of the retail industry’s best opportunities for creating a sustainable customer acquisition and retention strategy. As the CEO of a company that specializes in location data intelligence, we see marketers taking advantage of location data on a daily basis.

In the world of retail, Amazon has emerged as the biggest “frenemy” to companies of all sizes, whether they have physical locations, are e-commerce pure plays or are a blend of both. Amazon routinely uses its massive amounts of analyzed data to launch its own competing product lines and brands and undercut e-commerce competitors selling the same products.

Amazon understands the power of data. That’s one of the main reasons it purchased Whole Foods — to expand its data acquisition reach into the real world. Toys ‘R’ Us and all retailers should be taking advantage of every data tool at their disposal to compete with Amazon. There are numerous roles that the smart use of location data can play.

Many retailers, Toys ‘R’ Us included, are attempting to make the retail store a more exciting destination. They’re taking a page from the Apple playbook to enhance the shopping experience and use location data for in-store engagement, personalization and assistance. Retailers are leveraging real-time mobile location data by adding interactive sections inside the store where customers can engage with augmented reality content and games based on their position inside the store. Retailers are also enabling customers to receive product reviews and tutorials based on nearby products, also adding value to the shopping experience.

With location data, retailers have a unique ability to gain key insights about their customers and their journey on the path to purchase. Understanding where audiences go in the physical world allows retailers to create meaningful profiles on their shoppers. These profiles can be deployed in campaigns for retargeting previous shoppers and engaging with them based on differing audience traits. By knowing their own loyal brick-and-mortar consumers, they can reach these shoppers online and via social media. When these customers go to make their next purchase online, they’ll see a reminder that they are Toys ‘R’ Us customers and can be reinforced to continue shopping their online instead of migrating to Amazon.

Retailers should consider creating a “geo-conquesting” strategy by utilizing location data and geofencing to find audiences that shop at competing locations. Toys ‘R’ Us, for example, could work to incentivize and win over the shoppers at the GameStop, Target, Walmart and BestBuy locations, sending them relevant ads and offers when these competitive shoppers browse their phones or social media.

Retailers should also consider using location data to measure the effectiveness of all their marketing efforts. By connecting the various marketing channels — whether that is digital, print or TV — through mobile location data, retailers can easily quantify the return on investment for their omnichannel campaigns, quite possibly for the first time. To understand the ROI of marketing campaigns designed specifically to drive consumers to retail outlets, accurately measuring store traffic using location data becomes critical.

From the consumer’s perspective, they are looking to optimize their shopping experience by taking as few steps as possible in the purchase journey. Deploying a mobile payment strategy not only allows consumers to place and pay for orders, but it can also generate location data to gain a better understanding of consumer profiles, provide re-engagement opportunities and help further prove the value of their advertising spend. Ultimately, retailers must provide significant value-add back to the customer to create higher engagement and adoption. If the benefit is all to the marketer, consumers won’t see the value and consequently won’t take advantage of it.

Leveraging mobile location data opens significant opportunities for retailers. However, maximizing the value of location data requires the collection and analysis of significant amounts of customer data. There are privacy considerations associated with the capture and use of this type of data, so privacy compliance and data security should be built in from the beginning of any program. There are numerous organizations such as the Mobile Marketing Association (MMA), the Internet Advertising Bureau (IAB) and the Network Advertising Initiative (NAI) that are helping to set guidelines and establish best practices for the collection and use of mobile location data for the U.S. and for international consumer data (my business is a member of all three organizations). The goal should always be to maintain the trust and loyalty of the customer.

Ultimately, the Toys ‘R’ Us retailers of the world are competing with slowing retail sales across all sectors and their own financial difficulties, all while facing the threat from Amazon. I believe the smart use of data will play an increasing role to level the playing field for the executives and marketers at almost every single retailer today.