Philip Hammond’s decision, announced in Monday’s budget, to introduce a digital services tax is a brave and welcome step into the unknown. It makes Britain the second country, after Spain, to attempt to harness the greed of the tech giants and use the proceeds for social purposes. There is no serious doubt that the giant American advertising companies that own the social media, along with Apple and Amazon, whose business model is rather different, use some remarkably creative accounting to ensure they pay as little tax as possible in the countries where they operate. Facebook is the most notorious example in the UK, reporting a profit margin of less than 5% on revenues here, when its global average profits are closer to 50% of revenue.

By taxing revenue, rather than profits, Mr Hammond hopes to render that kind of accounting pointless. Governments have historically competed against one another to host the big companies by offering them the lowest possible taxes on profits. In Europe Ireland and Luxembourg have been particularly creative in this regard. The proposed tax sidesteps that. Unlike profits, revenues are a measure that the big companies have every incentive to boost. Many of them made no profits for years while working to gain their monopoly positions, and revenue was then a proxy for success.

His move is very openly targeted at the big five American companies: only those with global revenues of more than half a billion pounds qualify and the activities to be taxed are precisely defined: search engines, social media platforms and online marketplaces. The only obvious exception to this list of the biggest and most profitable businesses is YouTube, which doesn’t really qualify as either a search engine or a social media site. It is almost certain that other businesses will arise that attempt to take the same kind of position as Amazon, Google and Facebook: aggregators of demand that place themselves in the middle of almost every relevant transaction.

Tax avoidance is embedded in the values of large parts of Silicon Valley: most of what it calls “disruption” is an attempt to escape tax as well as regulation and to extend the attitudes of the gig economy to every kind of transaction. The most recent and perhaps the most shameless example of this is Grabr, a San Francisco company that puts buyers in high-tax countries in touch with people prepared to convey gadgets to them from low-tax countries. It claims more than 500,000 users. Such schemes are a direct assault on one of the core powers of a nation state. There is no reason to treat them as an inevitable or morally neutral result of technological progress.

If data is the new oil, as is often argued, then the personal data that these companies exploits should be treated as the property of citizens which the state is entitled to tax for our collective benefit. Oil is still taxed much more heavily than data will be under any foreseeable version of the present proposals. Even so, it is forecast by the OBR to raise only twice as much as data for the Treasury in 2020. In the long term, then, taxes on the exploitation and refinement of personal data will have to rise. Ideally, the proceeds could be placed in a sovereign wealth fund.

For the moment the shape and details of the proposed tax are all unclear. Mr Hammond is up against one of the largest and best-funded lobby groups in the world. Sir Nick Clegg, at Facebook, will be busy all this year trying to water down down this plan. He must not succeed. A licence to print money should not be a licence to avoid tax.