How to add FrostBanner with Google Tag Manager
Install your cookie banner and Google Consent Mode v2 from Google Tag Manager, without touching your site's code.
If your site already loads Google Tag Manager, you can add FrostBanner as a tag. The official FrostBanner template sets Google Consent Mode v2 before any other tag runs, loads the banner and passes every visitor's choice to Tag Manager.
1. Get your site ID
- Sign in to FrostBanner with Google, GitHub or your email.
- Add your website's domain, pick a style, write your texts and paste the link to your cookie policy.
- Open the Install tab and copy your site ID. It is the value of
data-sitein your line of code.
2. Add the FrostBanner template
- In Google Tag Manager, open your container and go to Templates.
- Under Tag Templates, click Search Gallery, search for FrostBanner, open FrostBanner – Cookie Consent Banner and click Add to workspace.
Not in the gallery yet? Download template.tpl from the FrostBanner template on GitHub. In Templates, click New under Tag Templates, open the ⋮ menu, choose Import, select the file and click Save.
3. Create the tag
- Go to Tags → New and choose FrostBanner – Cookie Consent Banner as the tag type.
- Paste your site ID into Site ID.
- Under Triggering, choose Consent Initialization - All Pages. This trigger runs before every other tag, so Google tags see the consent state from the first moment.
- Name the tag, for example FrostBanner, and click Save.
Leave the other fields as they are unless you need them. By default everything except security_storage is denied until the visitor chooses, a returning visitor's saved choice is applied straight away, and a frostbanner_consent_update event is pushed to the data layer after each choice.
4. Remove the old line of code
If you also added the FrostBanner <script> line to your site or with the WordPress plugin, remove it. Use only one way of loading the banner, otherwise it loads twice.
5. Make your other tags wait for consent
- Google tags (Google Analytics 4, Google Ads, Floodlight) read Consent Mode by themselves. Nothing to change.
- Other tags (Meta Pixel, Hotjar, LinkedIn and others): open the tag, go to Advanced Settings → Consent Settings, choose Require additional consent for tag to fire and add
analytics_storagefor statistics tools orad_storagefor ad pixels. - To fire a tag right after the visitor accepts, use a Custom Event trigger with the event name
frostbanner_consent_update.
| FrostBanner category | Google consent signals |
|---|---|
| Analytics | analytics_storage |
| Marketing | ad_storage, ad_user_data, ad_personalization |
| Functional | functionality_storage, personalization_storage |
6. Check it and publish
- Click Preview and open your site. The banner should appear.
- In Tag Assistant, open the Consent tab: the default state should be Denied.
- Accept cookies in the banner. The On-page Update column should show the categories you accepted as Granted.
- Click Submit → Publish.
Style, texts and language are changed in the FrostBanner dashboard, not in Tag Manager. After you publish in the dashboard, your site updates automatically.
Add your Google Tag Manager cookie banner now. The free plan covers one website, with no page or pageview limit.
Google and Google Tag Manager are trademarks of Google LLC. FrostBanner is not affiliated with Google. Tag Manager steps follow Google's consent mode template guide and Community Template Gallery guide, checked on 11 November 2026. FrostBanner does not give legal advice.