After more than a month in legislative limbo, TikTok’s future is clearer. On Wednesday, President Joe Biden signed a bill into law that gives TikTok parent ByteDance nine months to divest the U.S. assets of the short-form video app before it is banned nationwide. At the end of that period, it would have three additional months to finalize a sale if a deal is in progress. 

Several barriers stand in the way of an ownership change. TikTok is positioning the measure as an outright ban and says it violates the First Amendment rights of its users. Legal action is probable. On Wednesday, it posted a video featuring CEO Shou Zi Chew reaffirming the app’s intentions to oppose a forced sale in court.

Courts have ruled in TikTok’s favor before. In 2020, federal judges halted the Trump administration’s executive order to ban the platform from U.S. app stores.

The Chinese government also placed “content-recommendation algorithms” on its export control list in 2020, meaning that TikTok’s algorithm could only be sold with its approval. Given that China likely would not approve the sale, TikTok’s new owner would have to use another algorithm, taking much of the appeal out of the purchase.

Nonetheless, TikTok is closer to being sold or banned than ever before. Given the two options, social media execs are hopeful for divestiture. 

“This is me as a betting person and not necessarily looking at data, but TikTok will continue to exist because it’s a valuable asset,” says Ben James, chief innovation officer at GALE.

However, a TikTok sale presents marketers with challenges beyond an algorithm switch. The last time a major social media platform changed hands, Twitter eventually became X and lost millions in ad sales and nearly a quarter of its daily active users.

“Any shift in the platform or leadership can, as we’ve all seen this past year with the rollercoaster ride that’s been X, result in big changes to your strategy,” says Sarah Bertness Glawe, VP of digital strategy at Powell Communications.

In advice sent to clients on Wednesday, Mischief @ No Fixed Address warned that “during the Twitter sale and subsequent platform changes, brands saw a fallout in post-performance, follower counts and ad efficiency — leading to recommendations to de-prioritize the platform, particularly in paid.”

X is plagued with uniquely problematic brand safety issues that TikTok may not encounter — unless Elon Musk purchases that platform, too. Analysts value TikTok at more than $100 billion, making the most likely buyers tech giants such as Meta, Microsoft, Google and Amazon.

Should the U.S. force a TikTok ownership change that doesn’t resonate with users, agencies plan to know about it by tracking their clients’ engagement on the platform.

“One quick way to look at the health of the channel is just your existing audience numbers,” says Jamie Falkowski, chief creative officer at Day One Agency. “How’s that changing over time? Are you seeing an evolution in the demographics or locations of users?”

He adds that the creators it partners with and employees in-house also provide insight into a platform’s health.

Movers+Shakers, an agency best known for making brands go viral on TikTok, says it would rely on its culture squad to analyze trends and track consumers across platforms for opportunities.

“What are people talking about in wellness, skincare and sports? And how do those things create opportunities?” says Evan Horowitz, CEO. “We’re passing those insights to all of our teams that work with our clients.”

Mischief recommends clients monitor average reach and engagement across organic content, month-over-month follower counts and media efficiency. Should those metrics dip, it recommends brands move their paid investments to other short-form video platforms such as Instagram’s Reels and YouTube’s Shorts, with a slight preference for Reels based on Meta’s suite of advertiser and creator tools.

However, while those platforms offer short-form video tools, they lack TikTok’s algorithm, which often makes brands go viral. Other platforms have yet to crack the code, despite their best efforts.

For the next six months, social-first agencies such as The Social Lights are recommending clients stay the course on TikTok, so long as their engagement holds up. The Biden reelection team is also continuing its campaign presence on the app. 

But if TikTok sells, brands will need to reassess their presence on the platform based on public perception.

Agencies are watching for the first competitor to successfully emulate TikTok’s algorithm, especially as platforms prepare to pitch media buyers on new tools at this year’s Newfronts next week.

“We have the lineup of events and we’re going ‘what do we expect to be the conversation?’” says James. ‘“Where do we have relationships where we can understand what’s coming in and what’s on their roadmap for product development?”

This article originally appeared on PRWeek US.