Comply with Google Privacy Requirements implementing Consent Mode for Google Tag (GA4, Google Ads)

As more countries introduce privacy oriented regulations Google introduced Consent Mode to comply with new legal requirements. It is an extension to their existing, low-level tracking technology called DataLayer.

It allows website administrators to pass in a standardised way information about user consent. These flags are now becoming a requirement and Google API will change it's behaviour based on this information.

What you need?

How to implement it?