You might only know Walmart as a place to stop to pick up milk or paper towels, maybe a few other things, on your way home from work. But the biggest retailer in the world is doing a lot more than just selling groceries — likely a lot of things you don't even realize.

CEO Doug McMillon says the company is on track to become more of a "digital enterprise."

It's testing a retail lab in New York using artificial intelligence. It recently, for an undisclosed amount, acquired Silicon Valley-based Polymorph labs, with the goal of using the start-up's technology to make advertising with Walmart easier for small brands.

In February, it bought Aspectiva, a start-up that looks at a customer's browsing behavior and helps make product recommendations, again not disclosing the cost of that deal.

It's adding veterinary clinics to its stores and runs an online pet pharmacy now. And it continues to incubate its own brands — during the latest quarter it launched one that sells home furniture, called MoDRN.

In many ways, Walmart is becoming more like Amazon, as Amazon becomes more like Walmart by opening stores and trying to sell more groceries. Both companies are trying to hold their own in the industry.

While Amazon accounts for roughly 50% of all e-commerce sales in the U.S., Walmart is gaining ground. It surpassed Apple in 2018 to become the third-largest online retailer in the country, trailing only Amazon and eBay, according to eMarketer.

In addition to all the work it's doing in its bricks-and-mortar stores, Walmart also thinks it can own a bigger and better advertising business, rivaling Amazon's.

Amazon last year became the third largest ad platform in the U.S., behind only Google and Facebook. With more and more shoppers going straight to Amazon, not Google, to start their product searches, the e-commerce giant gets the chance to advertise more. When consumers are ready to buy a specific product, 74% of them are going straight to Amazon to do it, according to a study by Feedvisor.

And so Walmart is looking to do the same. That's one reason it's trying to make its website more of a landing page for other well-known brands — so far, it's brought in Lord & Taylor, Fanatics and Advance Auto Parts to Walmart.com.

"As we think about new revenue and income streams, we know we can do more in the advertising space," McMillon said Thursday, as Walmart reported quarterly earnings.

Meanwhile, the company is going deep into tech. That's despite it recently losing its chief technology officer, Jeremy King, to Pinterest. King, who joined Walmart in 2011, had been overseeing much of Walmart's digital strategy and also heading up Walmart Labs, the company's technology arm. With his departure, Fiona Tan, senior vice president of customer technology, stepped up into an "elevated role," according to Walmart.