Facebook is introducing ways to measure just how effective online ads are at increasing in-store visits and offline sales while also making it easier for users to find businesses closest to them.

Today, the social network is adding several new measurement tools that will allow stores to see how many people visit a store location after seeing a Facebook campaign. The features also allow for optimizing ad creative, delivery and targeting based on store visits and see results across individual stores or regions to better optimize ad campaigns.

Facebook's updates will provide real-time information on the offline response to advertising, allowing marketers to optimize creative in real time using Facebook insights at the campaign level. For example, that means if a national retailer has a separate campaign for each market, it's able to see what's working in California compared to Minnesota or New Hampshire.

The store visit metric, according to Facebook, is based only on information collected from people who have turned on the location services feature on their smartphone. And while the feature rolls out in the next few months, early testers have seen strong results. For example, French retailer E.Leclerc found it was able to reach 1.5 million people within 10 kilometers of its stores, with about 12 percent of clicks leading to visits within a week. Others have also begun using store visit measurement tools, including M&S, Petco, Burger King UK and Cadillac.

"This is a window into a black box that they've never had before," Sam England, Facebook's product manager, said in an interview. "It's not just something new for Facebook but something across the board."

The measurement tools are just the next step in Facebook's plan to connect online with offline. Last year, Facebook added new tools to let merchants target ads for nearby consumers, allowing advertisers to see anonymous users as close as 150 feet away.

Facebook isn't the first tech giant to add in these types of features. Back in 2014, Google introduced its own store visits tracker that helps show which ads drive foot traffic. Last month, Google announced it was adding local ads to Google Maps to help connect users with nearby retailers.

Along with measuring foot traffic, Facebook is also adding a way to connect which ads lead to actual sales—at least at the cumulative level—in stores or even over the phone. An Offline Conversions API will allow businesses to match transaction data from a customer database or point-of-sale system with Ads Reporting. The tool will also let businesses gather insights about demographics of the people who make a purchase.

"This is one of the biggest partner challenges that exist in a digital and mobile world," said Maz Sharafi, Facebook's director of monetization product marketing. "Consumers are increasingly spending their time in mobile and online, but transactions are happening everywhere."

Partners coming onboard for the launch include IBM, Index, Invoca, Lightspeed, LiveRamp, Marketo and Square.

Facebook is also adding a store locator option for local ads, which will allow people to navigate their way to the nearest store from within the ad itself. The feature shows information such as address, hours, phone numbers and estimated travel time.