Google Tag Manager, GTM for short, is a free tool for managing the measurement and marketing codes added to a website from a single panel. The GTM code is added to the site once; after that, "tags" such as Google Analytics, Google Ads conversion tracking and the Meta pixel are added, changed and removed from this panel without touching the site. Instead of going to a developer for every new measurement, the marketing team does it themselves, tests it in preview and publishes. GTM itself collects no data; it carries the codes that do.
What Does Tag Manager Do?
On a typical e-commerce site, five or six separate measurement codes run: GA4, the Google Ads conversion tag, the Meta pixel, perhaps a remarketing tag, a chat tool, a heatmap. When each is added to the site separately, three problems appear: every change needs a developer, nobody remembers which code is there and why, and the codes get in each other's way and slow the page down. GTM gathers all of them in one place, keeps who added what and when in version history, and reduces the speed cost by running tags after the page has loaded.
Its second function is defining conversions. You set up events in GTM such as "when the buy button is pressed", "when the thank-you page is seen", "when the phone number is clicked", and send them to GA4 and Google Ads at the same time. You define the event once and pass it to as many tools as you like.
Three Concepts: Tag, Trigger, Variable
What to do. Send a page view to GA4, report a conversion to Google Ads, load the Meta pixel. GTM has ready-made tag templates for common tools; no code writing needed.
When to do it. On every page load, when a page at a specific address is seen, when a button is clicked, when a form is submitted. A tag only fires when its trigger fires.
With which information. Page address, the text of the clicked button, basket value, order number. Variables carry data to tags and triggers.
Example: you want to send a purchase event to GA4 on the "order complete" page. The tag is a GA4 event tag, the trigger is a page view whose address contains "/order-complete", the variables are order value and order number. Once these three are set up, every order appears in GA4 with its value.
Setup: Container and Site Code
At tagmanager.google.com you open an account and a "container" for your site. GTM gives you two pieces of code: one for the top of the page, the other for the start of the body. This code is added to the site once; platforms such as ikas, Shopify and T-Soft have a ready field where you enter the GTM ID, and the code is not added by hand. On custom sites a developer adds it once and it is never needed again.
After the code is added, the GTM panel is empty; it measures nothing yet. The first tag is almost always the Google tag (GA4): you enter your measurement ID and choose "all pages" as the trigger. The second tag is the Google Ads conversion tag: with the conversion ID and label you get from Google Ads, linked to the purchase page trigger. The third is the Meta pixel; there is a ready template in GTM's community template gallery.
The Data Layer: Where Does the Order Value Come From?
For GTM to read the information "purchase 1,240 TRY" from the page, the site has to write that information to a standard place; that place is called the data layer. E-commerce platforms write the products, value and order number to the data layer themselves when an order completes; GTM reads from there and passes it on to GA4 and Google Ads. On custom-built sites a developer sets up the data layer; this is the only point in a GTM setup that needs developer support, and it is done once.
Without a data layer GTM still works, but it counts purchases without values: it sends the "thank-you page seen" event and does not know the amount. Calculating ROAS needs the amount; that is why the data layer should not be skipped.
Before Publishing: Preview
GTM's most valuable feature is preview mode. When you click "preview" in the panel, your site opens in a special window and on every page you see instantly which tag fired, which did not, and why. Walk through the purchase flow from start to finish in this mode: product page, basket, checkout, thank-you page. Do not publish until you have seen the purchase tag fire only on the thank-you page and only once. A purchase tag that fires a second time when the page is refreshed is the most common measurement error and doubles conversions.
Every change you publish is stored as a version. If something breaks, you return to the previous version with one click; that is a safety net code added directly to the site does not have.
Common Mistakes
- Adding the GA4 code both directly to the site and through GTM: every page view is counted twice
- Linking the purchase tag to the "all pages" trigger
- Publishing without previewing; broken measurement goes unnoticed for weeks
- Leaving old tags unpaused instead of deleting them; the container bloats, the page slows
- The GTM account staying with the old agency when agencies change; account ownership should always sit with the business
- Trying to measure purchase value without a data layer
Cookie Consent and Tag Manager
Privacy law, and GDPR for sites selling into Europe, requires marketing tags not to run without the user's permission. In Tag Manager the way to do this is consent mode: the cookie banner writes the user's choice to the data layer, and tags either fire or wait according to that choice. On visits without consent, GA4 does not measure and the Google Ads conversion tag does not fire. This is one of the most common reasons the conversion count falls below the real order count; if the number in the panel looks low, check the banner's consent rate first. Publishing without setting up consent mode puts the legal side at risk, not just the measurement.
When Is Server-Side GTM Needed?
Standard GTM runs in the browser; ad blockers and browser restrictions stop some tags. Server-side GTM sends tags through your own server and reduces those losses; Meta's Conversions API works on a similar logic. It has setup and maintenance costs; it makes sense for sites with a high monthly ad budget and a visible measurement loss, and it is premature for a site that is just starting.
The events going to GA4 and Google Ads through GTM come together with ad spend on the same screen in AdsLuma. When the purchase in GA4, the conversion in Google Ads and the store's real order count sit side by side, a measurement error (a double-counted purchase, a missing value) is noticed on the first day; in the Google Ads and GA4 conversions post we explained which differences are natural and which are errors.
Frequently Asked Questions About Google Tag Manager
What does GTM mean and what does it do?
Google Tag Manager; a free tool for managing a site's measurement and marketing codes from one panel. It is added to the site once, and every tag after that is set up and versioned from this panel.
Are Google Tag Manager and Google Analytics the same thing?
No. Analytics is the tool that collects and reports data; Tag Manager is the management layer that carries the codes of Analytics and other tools to the site. The GA4 code can be added through GTM or directly; if both are added, data is counted twice.
Do I need coding knowledge for Tag Manager?
Not for common tags; the ready templates and the interface are enough. Data layer setup and custom events may need developer support once. E-commerce platforms mostly send the data layer ready-made.
Does GTM slow down the site?
Used correctly it does not; on the contrary, it can speed things up by running tags after the page has loaded. What slows a site is unused tags piling up in the container; cleaning the container every six months is enough.
AdsLuma puts the events going to GA4 and Google Ads side by side with ad spend and real order data; a double-counted purchase or a missing value shows on the first day.
Book a demo


