The worlds of makeup and artificial intelligence came together on Friday.

L'Oreal (LRLCY), one of the world's biggest cosmetics companies, has purchased ModiFace, a Canadian firm that specializes in artificial intelligence and augmented reality technology.

It's the first tech acquisition in L'Oreal's 109-year history. The French company is hoping it will bolster its previous work on virtual beauty products.

Lubomira Rochet, the chief digital officer at L'Oreal, said that ModiFace's engineers, researchers and scientists would help it develop apps and in-store services.

The two companies are working on technology that can scan a human face and provide suggestions for skin-care products based on facial wrinkles, pores, hydration levels and pigmentation.

"We really want to invent the future of the beauty experience to help our consumers discover, try and buy... the best products and brands for them," Rochet told CNN.

Related: This futuristic salon lets you preview hair colors virtually

L'Oreal, which owns brands including Kiehl's, Maybelline and Garnier, is an industry leader when it comes to technology. It made waves in 2014 when it launched a virtual makeup app that has been downloaded over 20 million times.

In January, it updated an app developed with ModiFace that allows users to scan their face with their phone and try out different hair colors.

L'Oreal has long worked to develop its online presence, said Pinar Ergun, an analyst at UBS. It has increased its advertising on digital platforms like Facebook (FB), and paid social media "influencers" to feature its products.

The efforts have paid off, with 8% of revenue now coming from e-commerce channels.

"They have been investing quite a bit in digital," said Ergun. "If you're not online, you're definitely falling behind."

Anubhav Malhotra, an analyst at the investment bank Liberum, said the purchase would also deprive rivals of ModiFace's services.

ModiFace had worked with the cosmetics brand Benefit, which is owned by LVMH (LVMHF), on an app that allows customers to virtually "try on" eyebrow styles.