Legacy brands who not only adapt to but embrace digital marketing experience a new era of success. This was the lesson behind YouTube’s “What Matters Next” session on Tuesday, using the beauty and music industries as examples.

Hosted by YouTube CEO Susan Wojcicki, the Cannes Lions session boasted the direct link between its site and brand success but also delved into the challenges of marketing in a digital age.

L’Oreal just embarked on a digital-first strategy, led by its CEO in 2010.

“Digital has profoundly changed the dynamics of our beauty market and has brought very positive disruption,” said Lubomira Rochet, chief digital officer of L’Oreal. “Digital and beauty are really a perfect match—beauty is one of the most engaging categories online.”

Rochet outlined the century-old brand’s three-pronged strategy to embrace digital into its company culture. First, L’Oreal wanted to make it easy to shop for products online. Today, Rochet said, about 30 percent of all revenue comes from ecommerce.

Data was the second plan of attack, so to speak. L’Oreal uses data to personalize and target market to consumers worldwide. Thirdly, Rochet stressed the importance of an “always on” marketing strategy, constantly producing content and engaging with influencers.

Previously, Rochet noted, the beauty industry took a very top-down approach to marketing and embraced a limited vision of beauty. Platforms like YouTube have democratized beauty, she said, and double-digit growth in the beauty market can be linked to widespread access to creator-based content like tutorials.

Digital helped L’Oreal reach more consumers, but it also had an unexpected result—it allowed the brand to listen. It turns out, for example, that the brand’s marketing team used different beauty terms than consumers did in some cases, which helped them learn about who uses their products.

YouTube Music launched in 17 countries on Monday. The music industry has experienced tremendous growing pains as a result of the digital age, from piracy to distribution. Lyor Cohen, veteran music exec and global head of music for YouTube and Google said that he worried about distribution becoming too consolidated.

“If there’s a healthy ecosystem of distribution, it becomes safe for artists and labels,” said Cohen. “If it’s too consolidated and only one or two players own the distribution, that’s really problematic for the creative community.”

Cohen joined YouTube in 2016. At that time, he said that brands like YouTube only communicated with music labels when they needed to renew a license. Not “treating them like a customer” can lead to misunderstandings, he observed.

YouTube’s relationship with the music industry has been turbulent, but Cohen is convinced that they are moving in the right direction now thanks to open communication.

“We have a new love affair [with the music industry],” he said. “I’m happy to say that we’ve invested a layer of infrastructure that we speak on a daily basis to all the labels. We try to understand exactly what’s important to them. Our people are not simply engineers and tech people but they’re also people that have come from the label system that understands finding an artist and breaking an artist is almost impossible. If we could help them build products that make their lives easier, it would be fabulous. I think they’re starting to sense that we’re here to help them. I believe that the present and future of the music business is direct-to-consumer.”