Unity Software Inc. agreed to buy app monetization company IronSource in an all-stock deal valued at about $4.4 billion to help the gaming platform boost its advertising technology, which has suffered under recent data-privacy changes by Apple Inc. The company also lowered its annual revenue forecast, sending shares plunging 13 percent.

Unity’s advertising and monetization products, contained in its Operate Solutions unit, have been under pressure ever since Apple made it harder for companies from Meta Platforms Inc. to Snap Inc. to track ad views across mobile devices. Unity created what it thought was a workaround for Apple’s system, but in its latest earnings report, the company forecast lower revenue figures for the second quarter and this year, disappointing investors and suggesting the system wasn’t working. The stock plunged 30 percent on the report in May.

Unity’s Operate Solutions unit, which helps developers earn money through in-game purchases and advertising, accounted for about two-thirds of the company’s revenue in 2021.

“Buying IronSource may improve Unity’s capabilities in advertising technology — a bigger contributor to revenue than the core tools-subscriptions business,” Eileen Segall, a Bloomberg Intelligence analyst, wrote in a research note. “There’s room for ad-tech players to gain share in mobile in-app advertising amid pressure on walled gardens due to Apple’s recent changes to Identifier for Advertisers, which give advertisers fewer signals for targeting.”

The Iron Source acquisition, Unity’s largest deal yet, adds to the San Francisco-based company’s recent buying spree. Since mid-2021, it has pulled in avatar creation company Ziva Dynamics, real-time collaboration tool company SyncSketch and Weta Digital — a 3D digital tool company for $1.63 billion.

Unity, whose software underpins many popular video games, hasn’t been immune to the economic forces roiling the broader tech sector. In addition to the dismal earnings report, Unity last month announced plans to cut 4 percent of its 5,900 employees internationally. Its stock is down more than 75 percent this year. The price tag for IronSource also reflects a steep drop in valuation since the company went public through a merger with Thoma Bravo’s blank-check firm last year. At the time, the combined business was valued at $11.1 billion. The Tel Aviv-based company, which helps app developers analyze data on their users and monetize their creations, has dropped about 78 percent in trading in the last 12 months.

Unity said it expects full-year revenue of $1.3 billion to $1.35 billion, down from an earlier forecast of as much as $1.43 billion because of “macro trends, product launch and competitive dynamic with our monetization business.” Second-quarter financial results will be “slightly higher than the top end of the guidance range.”

According to terms of the deal, Unity will exchange 0.1089 shares of common stock for every ordinary share of IronSource. The transaction is expected to close in the fourth quarter.

Unity will also buy back as much as $2.5 billion of its own shares in the 24 months after the deal closes, the company said. Its two largest investors, Silver Lake and Sequoia, have agreed to invest a combined $1 billion in convertible notes in Unity at closing.