Short answer
A cookie consent setup that works has three parts: a banner that captures the choice, consent mode that passes it to Google’s tags, and Tag Manager settings that tie each tag to it. Set the default state first, send an update when the visitor chooses, then test with reject and accept.
A site has a cookie notice. The “Accept” button is large and coloured; “Reject” is somewhere inside the preferences. Someone opens the Tag Manager preview and notices that the GA4 tag fired before the notice even appeared. The banner is there, but the visitor’s choice stops no tag at all. Setting up cookie consent and consent mode is how you close that gap: the banner captures the choice, consent mode carries it to Google’s tags, and Tag Manager decides which tag may run and when.
We have covered the GA4 property itself in the GA4 setup checklist, the basics of Tag Manager in the Tag Manager guide, and the audience lists built after consent in the remarketing article. This piece is only the consent layer, from start to finish.
What the banner must do in practice
Which law applies to you, and what the banner text must say, are questions for your own lawyer. We recommend working with your lawyer on the cookie wording. Technical teams still have one concrete reference: the Turkish Personal Data Protection Authority’s “Guide on Cookie Practices” (Çerez Uygulamaları Hakkında Rehber, July 2025, published in Turkish). It describes itself as a guiding document of practical recommendations. On the banner it says the following:
- Explicit consent is given by an active act; merely having entered a site does not mean consent to the cookies running there.
- Where explicit consent is the legal basis, it has to be obtained before cookies are placed.
- Consent has to relate to a specific matter; for that, the guide considers it necessary to state the purpose of the cookie, its duration and whether it is first or third party.
- Consent has to be withdrawable. The guide gives a consent tool that shrinks to a small icon or strip in a corner of the page as a good example.
- It presents a panel on entry with “accept”, “reject” and “preferences” buttons of equal weight in colour, size and font as an example of good practice. It stresses that cookies needing explicit consent should be passive by default in the panel.
- For cookie walls, which block content until all cookies are accepted, it says the consent given may not be valid.
The guide also states that cookies used for behavioural advertising require explicit consent. Which of your cookies falls into which group, and what the panel says, is again for your lawyer. Technically this list comes down to one rule: until a choice is made, no tag that needs consent should run, and once it is made the tags must follow it. Consent mode does that second part.
What consent mode does and does not do
Consent mode (the glossary has a short definition) does not provide a banner. According to Google’s documentation, three things are expected of you: obtain the user’s choice, communicate that choice to Google, and make sure Google tags and third-party tags behave according to it. A banner or a consent management platform (CMP) does the first, consent mode does the second and the Google side of the third.
The choice is passed through consent types. Each can be granted or denied. The table lists the types with Google’s own descriptions.
| Consent type | What it controls |
|---|---|
ad_storage |
Storage related to advertising, such as cookies |
analytics_storage |
Storage related to analytics, for example visit duration |
ad_user_data |
Sending user data to Google for advertising purposes; required for enhanced conversions and tag-based conversion tracking |
ad_personalization |
Personalised advertising |
functionality_storage, personalization_storage, security_storage |
Storage for functions such as language settings, personalisation such as video recommendations, and security such as authentication and fraud prevention |
Google’s troubleshooting page asks for a default to be written for at least the first four. Of these, ad_user_data and ad_personalization were added in November 2023; older setups that do not send those two are incomplete.
Default is the state before the visitor chooses. According to the documentation, no values are set by default; you set a value for each type you use. Order matters: the default command has to run before any command that sends measurement data. If the banner loads slowly, wait_for_update gives it a number of milliseconds to respond.
Update is sent when the visitor makes a choice or later changes their mind. Consent mode does not save the choice; storing it in a first-party cookie or local storage and sending update on later pages is your job. Google describes scoping the default to the regions where you show a banner as best practice (the region value takes ISO 3166-2 codes). Which regions need a banner is another question for your lawyer.
Basic or advanced
Google defines two ways to implement it. Which one you choose depends on your company’s rules; Google itself tells you to check your company’s guidelines. Make that decision with your lawyer. The difference:
| Basic | Advanced | |
|---|---|---|
| Tags | Do not load until the visitor interacts with the banner | Load when the page opens; the default is denied unless you change it |
| Before a choice | No data goes to Google, not even the default state | The default consent state and measurement without cookies are sent |
| If the visitor refuses | No data is transferred | No cookies are written; measurement without cookies keeps being sent |
| If the visitor accepts | Tags load, then the default and the updated state are sent | Cookies are written and all measurement data is sent |
| Conversion modelling | General model | Advertiser-specific, more detailed model |
Setting it up step by step in Tag Manager
If you use Tag Manager with your own banner, Google recommends loading the banner through the container, using either a consent mode template you create or a ready-made one from the Community Template Gallery. The steps below assume a CMP whose provider offers a template in the gallery. Menu names are those of Google’s English interface.
- Turn on the consent view. Under Admin > Container Settings > Additional Settings, select “Enable consent overview”. The Consent Overview icon on the Tags screen then splits your tags into “Consent Not Configured” and “Consent Configured”.
- Add the banner’s template. Go to New tag > Tag Configuration > Community Template Gallery and add your provider’s tag. As the trigger, choose “Consent Initialization - All Pages”: according to the help page, every web container has it by default and it fires before all other triggers, Initialization triggers included.
- Write the default. Set the value for the four types. The
deniedin Google’s examples is only a placeholder; your organisation’s policy sets the real values. If you separate by region, use the template’s region setting. - Map the banner’s categories to the types. You state in the template fields which category manages which consent type. The mapping must match the banner text, and your lawyer writes the text.
- Put a consent condition on non-Google tags. Analytics, Ads, Floodlight and Conversion Linker tags have consent checks built in. For other tags, open Advanced Settings > Consent Settings > Additional Consent Checks, choose “Require additional consent for tag to fire” and list the types with “+ Add required consent”; the tag fires only if all listed types are granted. Mark tags you have reviewed and that need no extra consent as “No additional consent required”, so they do not hang around unreviewed in the overview.
- Preview, then publish. Changes take effect when the container is published. Run the test below before that.
Do not call the banner’s consent command through gtag in a Custom HTML tag; Google asks you to set consent states with a template tag and Tag Manager’s consent APIs.
Testing with reject and accept
Here is how we adapt the method on Google’s Tag Assistant page. Open preview mode, enter your site’s address in Tag Assistant, and make each attempt in a clean session (a private window).
- In the Summary, select the earliest Consent event. In the API Call section you should see
ad_storage,ad_personalization,ad_user_dataandanalytics_storageset. The same information sits in the Consent tab under a tag’s Output, in the “On-page Default” column. - Press Reject in the banner. Open the most recent Consent event and check that the four values were updated and that the “On-page Update” column is filled. In the Tags tab, click each tag to see whether it behaved according to its consent setting.
- In a new session, do the same with Accept. You should see the values updated to
granted. - Change the choice later from the preferences panel (withdraw a granted consent) and confirm that a new
updategoes out. - If you set region-specific defaults, repeat the steps with different simulated locations. Google recommends this explicitly.
If Tag Assistant says “Could not connect”, your container may be blocked from loading; Google notes that after you accept in the banner, Tag Assistant may be able to connect. An empty Consent tab means consent mode is not implemented on the page at all.
What happens to measurement when people refuse
When a visitor refuses, Google’s tags write no cookies. In advanced mode, measurement without cookies is sent instead: the consent state and the event, with functional information such as a timestamp, the user agent and the referrer. Google uses these signals for conversion and behavioural modelling in Google Ads and GA4. In basic mode, a visitor who refuses never reaches Google, and modelling in Ads rests on a general model.
The type matters too. If ad_personalization is denied, that person does not feed personalised advertising features such as remarketing in Google Ads. If ad_user_data is denied, user_id and the hashed first-party data used for enhanced conversions are not used.
The practical result: GA4 numbers can look lower than real orders, and modelling is an estimate. That is why we always compare the data with real order and form records. We do not use server-side tracking as a way around consent either; we tie it to the same choice. We explain why server-side tagging does not replace consent in what is server-side tagging. For the question of panels disagreeing, see why GA4 and ad platforms disagree.
Common mistakes
- A tag runs before the choice. Google’s Tag Assistant page calls this “default consent set too late”: the visitor opens the page, an ad tag fires, and the default arrives afterwards. The fix is to put the consent tag on the Consent Initialization trigger and every other tag after it.
- The default leaves out a type. Write the default for all four types.
- The banner loads late. Do not set the default asynchronously; use
wait_for_updateif you need to. updatecoincides with a page transition. The choice has to be sent on the page where it is made, before the page changes. Otherwise, in advanced mode, many sessions that accepted can lack asession_startevent in GA4. An update sent just as the page unloads can also be cancelled by the browser.- The choice is not stored. Consent mode does not store it; a site that starts every page as
deniedloses the visitors who accepted, too. - Non-Google tags have no consent condition. A tag left under “Consent Not Configured” in the overview does not see the choice.
- Assuming the banner works. A visible banner does not show the setup works; the reject and accept test above is essential.
Common questions
Does consent mode replace cookie consent?
No. According to Google’s documentation, obtaining the user’s consent is your responsibility, and that takes a banner or a CMP; consent mode passes the choice to Google’s tags. Whether the text and process are legally sufficient is for your lawyer.
Should I choose basic or advanced?
The technical difference is in the table above: in basic mode a visitor who refuses is not measured at all, while in advanced mode measurement without cookies is sent and modelling is more detailed. Google tells you to check your company’s guidelines; decide with your lawyer.
A ready-made CMP or my own banner?
When working with Tag Manager, Google recommends leaving consent handling to a CMP; CMPs offer templates in the gallery. If you use your own banner, you need to write a template with Tag Manager’s consent APIs.
One thing you can try today: open the site in a private window, connect the Tag Manager preview, press Reject and check in the Summary whether the first Consent event comes before the first tag. If it does not, that is the first place to fix. We set up consent mode as part of our data and CRO service; the cookie wording is for your lawyer to write.
Sources
- Google for Developers: Consent mode overview
- Google for Developers: Set up consent mode on websites
- Google for Developers: Troubleshoot consent mode with Tag Assistant
- Tag Manager Help: Tag Manager consent mode support
- Turkish Personal Data Protection Authority (KVKK): Guide on Cookie Practices (in Turkish)
This article is general information, not legal, financial or technical advice. Platforms, their rules and the law change over time, so some details may have changed since 11 November 2026 or contain small errors. Before you make a decision for your business, check the current official sources or write to us.