By Nathaniel Meyersohn, CNN Business

Dollar General built a discount empire out of no-frills stores that sell snacks and household staples to budget-conscious buyers. Now it has to go high tech to keep up with customer demand and to stave off competition.

The company's shoppers are increasingly using mobile apps, self-checkout and other technology to shop. Digital is becoming a "big part" of customers' lives, Dollar General chief executive Todd Vasos said last year.

Dollar General is also building a digital strategy because customers who redeem digital savings coupons and use the new Dollar General app, released last year, spend about twice as much on average as regular shoppers.

And Dollar General doesn't want to risk losing customers to Walmart, which has successfully implemented digital technology at thousands of stores.

Taking longer to get there

It's not a surprise that Dollar General has been slow to embrace digital. The company's core customers make about $40,000 a year per household, more than $20,000 below the national average.

Because of the income gap, Dollar General's main customers are often "behind the curve" on new technology, Vasos said at an analyst conference last year. For example, he said, the company's core shoppers were slower to use smartphones than wealthier Americans. But smartphones are ubiquitous now, and about 85% of Dollar General's customers use one, in line with the national average.

"It's taken her a little longer to get there, but she got there," Vasos said, alluding to a typical customer.

The proliferation of smartphones has also given Dollar General a more practical way to adopt new technology. Although the company has an online shopping business, its low-cost operating model is not designed for the high costs of e-commerce shipping, said Vincent Sinisi, analyst at Morgan Stanley.

Dollar General customers only spend around $10 to $12 on average when they shop, which makes it tough for the retailer to pull a profit online.

Instead, Dollar General's biggest strength is the convenience of its physical locations. It has more than 15,400 stores in the United States, a bigger footprint than Walmart, Kroger, Target and Costco combined. So it makes sense for the company to focus on ways to make customers' shopping trips faster and easier — using their smartphones.

"Consumers across all income levels want the same thing — convenience, innovation, speed and value," said Joseph Feldman, analyst at Telsey Advisory Group.

Mobile apps and faster checkout

In 2018, Dollar General launched DG GO!, a mobile app. The app allows customers to scan bar codes on products while they shop and keep a running total of their receipt.

In hundreds of stores, customers can also skip the line and checkout directly through the app using a special kiosk in the store. Self-checkout helps Dollar General hold down labor costs and frees up workers to stock shelves and complete other store tasks, instead of sitting at the cash register.

The mobile app has been popular with shoppers, according to Vasos. Dollar General has found that customers often use the app's "cart calculator" feature as they shop, even if they don't skip the line at the end and checkout through one of the kiosks.

The app and cart calculator "help our customers further stretch their budgets by helping them identify new opportunities to save in store," said Crystal Ghassemi, spokesperson for Dollar General.

Dollar General upgraded its in-store Wi-Fi and offers the cart calculator through the app at thousands of its stores.

It's a strategy that could compel customers to keep returning to stores, said Sinisi from Morgan Stanley. Dollar General also has an opportunity to reach wealthier shoppers by adding new tech, he added.

Dollar General's new technology will also allow customers to buy online and pick up in stores. The company announced in March that the option will begin later this year.

"We believe that could be another leg of convenience for our core customer," especially during the winter and for shoppers with children, Vasos has said about in-store pickup.

Fighting off Walmart and 7-Eleven

Dollar General has to implement these tactics in part to keep up with competitors, which have been heavily in digital.

Family Dollar, which is owned by Dollar Tree, recently launched a mobile app for the first time.

And convenience stores such as 7-Eleven and grocers like Kroger are rolling out scan-and-pay options and self-checkout to help customers speed up their shopping trips. Walmart has been stationing employees with mobile scanners in high-traffic aisles of stores to checkout customers and is testing a cashier-less Sam's Club store.

Dollar General has a close eye on Walmart, perhaps its biggest threat.

More than half of Dollar General's stores are within a 10-minute drive of a Walmart, according to a research report by UBS analysts.

And Walmart has been lowering prices and rapidly scaling up stores that offer online pickups. Around 10% of Walmart shoppers already use curbside pickup, according to research from analysts at Cowen. By the end of the year, around 3,000 Walmart stores will offer buy online, pickup in store.

With customers quickly embracing Walmart's pickup options, Dollar General can no longer afford to sit out on the popular new way to shop.