Dear Ladies and Gentlemen of the Matomo Team,
Below is a feature request that is certainly beneficial for many users that are concerned with the implementation of new compliance requirements by the GDPR.
In short, the feature is intended to be an extension to the Consent Manager. Currently, there is only one interface for the inclusion of cookie permissions to Matomo, but no "copy / paste" script (as it is available with the opt-out script). Many customers have to obtain the permission of the visitor actively, according to the regulations of the GDPR, where a simple opt-out is no longer enough.
The service provider PIWIK Pro has already solved this very appealingly. Such an option would be very useful for Matomo.
Does this 'solution' load any content at all from the backing-up server? If so, you can trash the whole thing because you are not allowed to load ANY content before content is given (if you take the opt-in approach).
Unfortunately, this is not quite true.
If you insert a script from Matomo asking the user if he wants to be tracked or not (or if his user behavior can be analyzed and evaluated on the website) then that is legitimate and legally correct (but only if before the Website visit no tracking scripts are loaded. But this would't make sense at all.)
In the moment any request reached the Matomo server, you contacted an external server which might already be a problem. The better solution is to handle the contens yourself and afterwards load the tracking script dynamically.
But Matomo is hosted on our side, and the whole point of integrating this function is to ask for permission to track users. Tracking without permission is allowed if the data is anonymized (= no personal data can be related to a person)