let's document the useful feature of "Creating a custom opt-out".
An example was provided in https://github.com/matomo-org/matomo/pull/12829#issuecomment-386937268
I just discovered this and already implemented it on one of our sites – works great!
One thing I noticed: When using the default opt-out iframe, it also handles the case of users having “Do Not Track” activated in their browser (“You are not being tracked since your browser is reporting that you do not want to. This is a setting of your browser so you won't be able to opt-in until you disable the 'Do Not Track' feature.”) Is there an (easy) way of replicating this behaviour with a custom opt-out form, too? If so, it might be useful to include this in the example.
@noniq you can use https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack for detecting it.
Just keep in mind that it is different in every browser.