The detail of how best to regulate is a subject matter for experts, not me. In principle precisely the same way we have legislated against pumping sulphur dioxide out of a chimney in the atmosphere. Same rules for everyone. Now go and compete. You get experts on pollution, mitigation and economics to advise on what will work best for the outcomes you want to achieve. Similar domain experts are required here.
Now I have no doubt that facebrick and the evil-goog will try for regulatory capture and employ their vast army of Washington lobbyists in rent-seeking activities but that is a separate problem applicable in every industry where market failure means you have to regulate, not just this one. (And yes it does need solving, absolutely urgently). If you don't have to regulate because the market is working, great! Don't regulate! That's not what we have here, this is market failure but we haven't yet regulated. It will come because there are clearly externalities in this market, Well it will come unless we give up on democracy first. Something with which facebrick and evil-goog seem really comfortable as long as they supplant it.