The bridge between your banner and Google.
Google Consent Mode v2 is a JavaScript API that Google's tags (gtag, GTM, Google Ads, Google Analytics 4) listen to for consent signals. When a visitor clicks "Accept" or "Reject" on your cookie banner, your banner needs to call gtag('consent', 'update', { ... }) with the right consent state for Google's tags to behave appropriately.
Google Consent Mode v1 (the original) shipped in 2020 with two consent types: ad_storage and analytics_storage. Consent Mode v2 added two more in March 2024: ad_user_data (whether Google can use the visitor's data for personalization) and ad_personalization (whether to show personalized ads). All four are now required for EEA and UK visitor traffic to keep flowing into Google Ads campaigns.