McDonald's announced plans to acquire a tech company — its largest deal in 20 years — as it continues to push its U.S. locations into the digital age.

The fast food giant said Monday it has agreed to buy Dynamic Yield, which specializes in personalization and decision logic technology. Dynamic Yield's technology will allow McDonald's digital drive-thru menus to change based on different factors, such as the weather and current restaurant traffic.

The deal is valued at more than $300 million, making it the largest McDonald's deal in two decades, people familiar with the matter said.

The acquisition is McDonald's latest move to incorporate more technology in its brick-and-mortar locations. In 2019 alone, the company is planning to spend nearly $1 billion to upgrade about 2,000 U.S. locations.Those renovations, like the addition of self-serve kiosks and digital menu boards, are meant to boost sales by increasing convenience for customers, although some franchisees have complained that the expensive project is hitting short-term sales without any payoff. Other investments, like in McDonald's mobile app, have helped the company gain access to more consumer data to fine tune its business.

The company said that it already tested the drive thru technology in several of its U.S. restaurants last year. It plans to roll it out to other U.S. locations this year, with international expansion on the horizon.

"With this acquisition, we're expanding both our ability to increase the role technology and data will play in our future and the speed with which we'll be able to implement our vision of creating more personalized experiences for our customers," CEO Steve Easterbrook said in a statement.

When the deal closes, Dynamic Yield will remain a stand-alone company and continue to work with clients other than its sole owner.