New York CNN Business  — 

Lego lost a huge customer when Toys “R” Us went out of business last year.

But the toy maker found a way around the problem. Lego expanded distribution at big retailers like Walmart and Target, and it doubled down in China, Lego Group CEO Niels Christiansen told CNN Business.

The privately-held Danish toy company said Wednesday that sales grew 4% in 2018 after falling the previous year.

Lego bucked the global slowdown in toys and grew sales in the United States, Europe and Asia. That’s despite toy sales falling 2% around the world in 2018 after four straight years of growth, according to market research firm NPD Group.

Lego increased its space on Walmart and Target shelves, and it participated in toy events that those retailers held in stores during the run-up to the holidays. Target, for example, remodeled toy sections at some stores and added signs and oversized displays, including a giant three-foot Lego slide above the aisles.

“It’s very important to be in physical stores,” so kids can touch and play with Lego sets, Christiansen said.

The company also focused on expanding online. Walmart, for example, created an online toy lab where kids can play with the Lego Creator Pirate Roller Coaster. Amazon said the Lego Creator Mighty Dinosaurs Toy was among the top-selling toys on its website during the holiday stretch.

Walmart, Amazon, and Target account for the majority of toy sales across retail in the United States, and toy makers must develop strategies to take advantage of their reach, according to Jim Silver, chief executive of TTPM, a website that reviews toys.

Despite Lego’s success last year and its projection for sales to grow in 2019, it’s getting more difficult for legacy toy makers to stand out against the latest video games and tech gadgets.

Lego found ways to adapt to Toys "R" Us' absence, such as three-foot slides above the aisles in some Target stores during the holidays.

“Kids are getting busier and have less time for fun play,” Christiansen said. “It’s a fight for time.”

Mattel and Hasbro, for example, have both struggled recently.

But Lego said it plans to invest in new products to stay relevant, including finding ways to leverage new technology like Augmented Reality to build its brand with tech-hungry kids. Earlier this month, it debuted Lego Hidden, an AR app that lets kids interact with their Lego sets and chase ghosts.

“Lego Hidden is a great example of innovation,” Silver said.

China is also a big part of Lego’s strategy. Sales in China jumped by double digits last year as the company opened new Lego stores, including a flagship store in Beijing. In 2019, Lego plans to open 80 more stores in that country.