The newly introduced AMP-Consent Component has some really nice features, which i would adapt in order to comply with the new cookie - policy.
https://github.com/ampproject/amphtml/issues/13716
My question is: how to implement an endpoint and how to trigger this (xhr)? I haven't found an really working solution for this till yet.
You can find two sample flows on how to use amp-consent on ampbyexample.com.