Borrowing a page from ecommerce, McDonald's is going high-tech to make menu recommendations. That goal is behind the fast-food giant's move this week to fork out more than $300 million to buy Israeli technology company Dynamic Yield, its biggest acquisition in 20 years.

McDonald's plans to install Dynamic Yield's technology in its drive-thrus and self-order kiosks, as well as on its mobile app. The AI-powered software will let McDonald's change what's displayed on its digital menu boards based on factors including what a customer has already ordered, along with local weather and traffic conditions.

In a video touting the technology, McDonald's CEO Steve Easterbrook likened what's to come to online shopping on sites like Amazon, Best Buy or Walmart.com: "As you place your cursor over an item and click, it enters your shopping basket and automatically suggests other items that are associated with that." Customers would also more likely see visuals of McFlurries when it's hot and coffee when it's cold.

Get Breaking News Delivered to Your Inbox

McDonald's also expects Dynamic Yield to help make restaurants more efficient. The software will track service times at individual outlets and suggest items that are easier to make during peak hours so drive-thrus run smoother, among other features. More broadly, McDonald's can glean valuable insights by gathering data on its 68 million daily customers.

More personalized service

Under Easterbrook, who became CEO in 2015, McDonald's has incorporated technology including self-order kiosks and digital menu boards as part of a $6 billion overhaul for its U.S. restaurants announced last year. It included designating parking spots for customers ordering food through its mobile app.

"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," Easterbook said in a statement.

Founded in 2011, Dynamic Yield specializes in "personalization" software, with customers including Ikea, Urban Outfitters, AutoNation and American Greetings. McDonald's started testing the technology in several U.S. locations last year, and plans to expand its use for drive-thru menus across the U.S. this year and then internationally.

McDonald's is the world's largest fast-food chain, with nearly 38,000 locations in more than 100 countries.