Is there a solution? - There is!
Specialised companies such as zweipunkt AG in Basel know the problem described above only too well and regularly work out solutions with their customers to defend their legitimate interest in correctly measuring and optimising their own website. The following two approaches (together) make it possible to dispense with consent in principle.
Cookie IDs
In order to prevent cookie IDs set and collected by the tracking tool from allowing a personal reference, most tracking tools can be modified so that they do not set persistent cookies or temporarily store the generated IDs in session storage.
This means that a person receives a new ID for each visit, which is automatically deleted by the browser at the end of the visit. As a result, there is no longer any personal reference. The price of this measure is that you lose user-related metrics such as the number of visits, new/returning users and so on. However, this is certainly manageable in relation to the recovered information about the origin of a visit.
However, if user metrics are to be retained, there is another option. The ID is stored in local storage (persistent). Before tracking, however, it is anonymised using a one-way algorithm (e.g. MD5) and only this anonymised value is fed into the tracking tool. This means that the same person always has the same ID across visits, but the personal reference is broken, as the tracking tool has no way of tracing the ID received back to an ID that actually exists.
IP addresses
IP addresses are to the Internet as street numbers are to the post office; you cannot do without them as they are an integral part of all Internet communication. However, to prevent the tracking tool from receiving the IP address of the person being tracked, the tracking requests can be transmitted to the tracking tool via a so-called proxy. The proxy acts like a shield, as the tracking tool only ever sees the IP address of the proxy (always the same), which cannot be attributed to any person.
If a CDP such as Tealium Customer Data Hub is already in use, it can often take over the role of the proxy. This is often referred to as server-side tracking.