Ai pus Google Analytics pe site cu ani în urmă, apoi ai adăugat Facebook Pixel, poate și un pixel de TikTok. Toate trimit date din prima secundă în care vizitatorul intră pe site, indiferent dacă a apăsat vreun buton de acord. Asta e exact ce nu ai voie să faci, și e motivul pentru care unele firme au primit amenzi de la Autoritatea Națională de Supraveghere a Prelucrării Datelor cu Caracter Personal.
Legea e simplă în esență: orice cookie care nu e strict necesar pentru funcționarea site-ului se pune abia după ce vizitatorul a fost de acord. Analytics, Pixel, orice script de marketing — toate intră aici. Cookie-ul care ține minte că ai pus un produs în coș, nu.
De ce Google Tag Manager e locul potrivit să repari asta
Google Tag Manager (îl găsești la tagmanager.google.com) e un instrument în care ții toate scripturile de urmărire — Analytics, Pixel, orice altceva — fără să le scrii direct în codul site-ului. Fiecare script se numește un tag. Fiecare tag are condiții care spun când să pornească: pe toate paginile, doar pe pagina de contact, sau — ce ne interesează aici — doar după ce vizitatorul a bifat acordul.
Dacă tagurile tale pornesc necondiționat, la fiecare încărcare de pagină, ai o problemă. Dacă pornesc condiționat, în funcție de un semnal pe care îl trimite bannerul de cookie-uri, ești în regulă.
Cum faci legătura, pas cu pas
- Instalezi un banner de consimțământ care respectă GDPR — nu unul cu un singur buton „Accept”, ci unul cu opțiuni separate pentru statistici și marketing, și cu un buton clar de refuz. Pe WordPress, un plugin ca Complianz sau CookieYes face asta.
- Verifici ce semnal trimite bannerul în Consent Mode de la Google — practic, când vizitatorul acceptă, bannerul scrie în fundal ceva de genul „analytics_storage = granted”. Pluginurile bune fac asta automat.
- Intri în Google Tag Manager, la fiecare tag de Analytics sau Pixel, și îi adaugi o condiție de declanșare (trigger) legată de acest semnal. Practic îi spui tagului: pornește doar dacă analytics_storage e granted.
- Publici containerul din Tag Manager (butonul Submit, apoi Publish) și testezi în modul Preview: intri pe site fără să dai acord și te asiguri că Analytics nu trimite nimic. Apoi dai acord și verifici că pornește.
Ce nu ține de GTM, dar contează la fel de mult
Tag Manager rezolvă partea tehnică — cine pornește și cine nu. Nu rezolvă bannerul în sine: dacă bannerul are un singur buton mare de acceptare și niciun refuz vizibil, tot ești în neregulă, indiferent cât de bine ai legat tagurile.
Verifică și politica de cookie-uri de pe site: trebuie să spună exact ce cookie-uri se pun, de la cine (Google, Meta, etc.) și cât timp. Nu e nevoie de un text lung — trei rânduri clare bat un paragraf vag.
Ce faci mâine dimineață
Deschizi site-ul într-un tab nou (fără să fii logat, ca să vezi bannerul de la zero) și te uiți ce se încarcă înainte să dai vreun acord. Deschizi consola browserului (F12, tab Network) și cauți după „google-analytics” sau „facebook”. Dacă apar înainte de clic, ai treabă de făcut chiar azi, nu la finalul lunii.
Întrebări frecvente
Dacă am doar Google Analytics, tot am nevoie de Tag Manager?
Nu neapărat de Tag Manager, dar ai nevoie de un mecanism care să oprească Analytics până la acord. Tag Manager face asta mai simplu decât să editezi codul de fiecare dată.
Cât timp durează să configurez asta pe un site existent?
Pentru un site cu câteva taguri, o oră-două, dacă bannerul de cookie-uri e deja instalat corect. Cea mai mare parte a timpului se duce pe testare, nu pe configurare.
Ce se întâmplă dacă vizitatorul refuză toate cookie-urile?
Analytics și Pixel nu pornesc deloc pentru el, deci nu îl vei vedea în rapoarte. E normal — pierzi date, dar ești în regulă cu legea.
You put Google Analytics on your site years ago, then added Facebook Pixel, maybe a TikTok pixel too. All of them fire the moment a visitor lands on the page, whether or not anyone clicked a consent button. That's exactly what you're not allowed to do, and it's why some businesses have already been fined by their national data protection authority.
The rule is simple at its core: any cookie that isn't strictly necessary for the site to function only gets set after the visitor agrees to it. Analytics, Pixel, any marketing script — all of that counts. The cookie that remembers what's in someone's shopping cart doesn't.
Why Google Tag Manager is the right place to fix this
Google Tag Manager (at tagmanager.google.com) is where you keep all your tracking scripts — Analytics, Pixel, anything else — without hardcoding them into the site. Each script is called a tag. Each tag has triggers that decide when it fires: on every page, only on the contact page, or — what matters here — only after the visitor has checked a consent box.
If your tags fire unconditionally on every page load, you have a problem. If they fire based on a signal sent by your cookie banner, you're covered.
How to connect them, step by step
- Install a consent banner that actually follows GDPR — not a single 'Accept' button, but one with separate toggles for statistics and marketing, plus a clear reject option. On WordPress, a plugin like Complianz or CookieYes handles this.
- Check what signal the banner sends through Google's Consent Mode — in practice, when a visitor accepts, the banner writes something like 'analytics_storage = granted' in the background. Good plugins do this automatically.
- Go into Google Tag Manager, open each Analytics or Pixel tag, and add a trigger tied to that signal. You're telling the tag: only fire if analytics_storage is granted.
- Publish the container (Submit button, then Publish) and test it in Preview mode: load the site without giving consent and confirm Analytics sends nothing. Then accept and confirm it fires.
What GTM doesn't fix, and still matters
Tag Manager handles the technical side — who fires and who doesn't. It doesn't fix the banner itself: if it has one big accept button and no visible reject option, you're still non-compliant no matter how well you wired the tags.
Check your cookie policy page too: it needs to say exactly which cookies get set, by whom (Google, Meta, etc.) and for how long. It doesn't need to be long — three clear lines beat one vague paragraph.
What to do tomorrow morning
Open your site in a new tab without being logged in, so you see the banner fresh. Open the browser console (F12, Network tab) and search for 'google-analytics' or 'facebook'. If they show up before you click anything, you have work to do today, not by the end of the month.
Frequently asked
If I only have Google Analytics, do I still need Tag Manager?
Not Tag Manager specifically, but you need some mechanism that blocks Analytics until consent is given. Tag Manager just makes that easier than editing code every time.
How long does this take to set up on an existing site?
For a site with a handful of tags, an hour or two, assuming the cookie banner is already installed correctly. Most of the time goes into testing, not configuration.
What happens if the visitor rejects all cookies?
Analytics and Pixel simply never fire for that visitor, so you won't see them in your reports. That's expected — you lose some data, but you're compliant.


