Google Tag Manager is a free tag management system that allows the measurement and marketing codes (tags) added to a website to be installed and managed through a single web-based dashboard, without editing the site files each time. The container code is placed on the site once; tags such as Google Analytics 4, Google Ads conversions, or the Meta pixel are then installed, tested, and published through this dashboard.
This guide explains the tool’s basic concepts of tags, triggers, and variables, the role of the data layer, installation steps, configuring the GA4 tag, preview mode, publishing versions, consent mode, and common mistakes. In the Turkish interface, the tool is called “Google Etiket Yöneticisi”; the explanations are based on the Tag Manager Help Center.
What does Google Tag Manager do?
Google Tag Manager enables marketing and analytics teams to add tags without depending on a developer or theme files for every new measurement requirement. The Tag Manager overview pagestates that a container can replace the manually coded Google and third-party tags on a website.
In practice, this means the following: when a conversion tag is needed for a new advertising campaign, there is no need to open a theme file or install a plugin; the tag is prepared, tested, and published in the dashboard. Because all the tags are kept in one place, it is also easy to see which code is on the site and why. If a tag causes a problem, returning to the previous version takes just a few clicks.
The tool’s limitations should also be understood. Tag Manager manages measurement codes, but properly defining the events to be measured and interpreting the collected data are separate tasks. An incorrectly configured tag produces data just as misleading as faulty code added manually.
Understanding accounts, containers, and workspaces
In Google Tag Manager, the hierarchy consists of an account, a container, and a workspace. The account generally represents the company; Google’s help documentation states that a single account is sufficient for most organizations.
A container is the complete collection of tags, triggers, and variables configured for a particular website or application. A separate container is not needed for every page of the site; one container is enough for a website. The workspace is the section where changes to the container are kept in draft form. If several people work in the same container, each can use a separate workspace to work without disrupting the others’ changes.
Permissions are also assigned through this structure. Users who can add tags but cannot publish them can be defined; this keeps control of every change that goes live on the website with designated people. When working with an agency or freelancer, the container stays in the business’s account, and outside collaborators receive only the level of user access they need.
Tags, triggers, and variables: three basic concepts
The tag defines what will be done, the trigger defines when it will be done, and the variable defines which information will be used. According to Google’s triggers page, tags fire when an event occurs; the trigger monitors events such as form submissions, button clicks, or page views.
| Concept | Question it answers | Example |
|---|---|---|
| Tag | Which code will run? | GA4 event tag, Google Ads conversion tag, Meta pixel |
| Trigger | When will the code run? | When the thank-you page is viewed, when the WhatsApp button is clicked |
| Built-in variable | What information is readily available? | Page URL, address of the clicked link, form ID |
| User-defined variable | What business-specific information will be passed? | Order value, measurement ID, product name read from the data layer |
A good implementation also uses consistent naming. Tags whose names reveal their type and purpose, such as “GA4 – Event – form_gonderimi”, make maintenance easier as the container grows. Measurement IDs used repeatedly are also stored in a constant variable; if an ID changes, it can be updated in a single place.
What does the data layer (dataLayer) do?
The data layer is the JavaScript object through which the website passes information to Tag Manager in a structured and reliable way. Instead of extracting information from visible text on the page, the order value, product ID, or step completed by the user is written to this object, and variables read it from there.
The advantage of this approach is that measurement does not break when the design changes. When a button’s text or class name changes, triggers that read from the screen can stop working; events written to the data layer remain independent of the design. Platforms such as WooCommerce have plugins that pass ecommerce events to the data layer; on custom-built websites, this part is planned together with the developer.
For example, when an order is completed, the order number, total value, currency, and list of purchased products can be written to the data layer as a single event. Google Tag Manager uses a custom event trigger that captures this event to fire the GA4, Google Ads, and Meta tags simultaneously; each platform reads the information it needs from the same source. This also reduces discrepancies between the sales figures shown on different platforms.
Page contents
Google Tag Manager installation step by step
Installation consists of creating an account and container, adding the container code to the website, and publishing the first tag. The sequence followed is as follows:
- Sign in at tagmanager.google.com using the business’s permanent Google account.
- Create an account; enter the account name and country.
- Create a web container and enter the site’s main address as its name.
- Add the two code snippets provided by the dashboard to the website: one as high as possible in the head section, and the other immediately after the body tag.
- List the old measurement codes that were added manually to the website; identify which ones will be moved into the container.
- Create the first tags and triggers, and test them in preview mode.
- Publish the changes as a version with an accompanying description.
On WordPress websites, the container code can be added through a plugin or the child theme’s header file. If the code is written into the parent theme’s files, it may be lost during a theme update. On newly built WordPress websites, planning the measurement infrastructure before delivery reduces the need for later corrections.
How do you install a GA4 tag with GTM?
GA4 is installed in Tag Manager using a Google tag and any event tags that are needed. The page on setting up Google Analytics in Tag Managerexplains creating a GA4 property and web data stream first, and then adding a Google tag with the measurement ID.
The Google tag is configured to run on all pages with an initialization trigger, and it begins measuring page views. Separate GA4 event tags are created for important actions such as form submissions, phone clicks, or purchases, and each is connected to its own trigger. The events that are truly valuable to the business are marked as key events in GA4.
If GA4 code runs on the same website through both a plugin and Tag Manager, page views are counted twice. Before installation, always check whether Analytics code has been added to the website through another method. The configuration of conversions to be used in advertising campaigns is also planned as part of Google advertising management services.
Let’s plan your tag configuration together
A free preliminary assessment is provided when you share a short message explaining which actions will be measured, which codes already run on the website, and how the advertising accounts will be connected. Installation takes place in the business’s own Google account; once the scope is clear, pricing information is sent the same day together with the list of tags.
Preview mode: testing before publication
Preview mode allows you to run the draft container on the website as though it were published, before actually publishing it, and see which tags fire and in what order. The container preview and debugging pagestates that this mode connects to Tag Assistant and that the debugging interface is not shown to the website’s regular visitors.
Preview is started using the Preview button in the workspace, and the website’s address is entered. The website opens in a new window; every click, page transition, and form submission is listed as an event on the Tag Assistant screen. The reason a tag did not fire can be understood by examining which trigger condition was not met.
During testing, you verify both that the tag works and that it remains inactive in situations where it should not run. The main points checked in preview before publication are as follows:
- The Google tag runs once on each page and is the first to run.
- The conversion tag fires only after a successful form submission or order confirmation.
- No conversion tag runs for an unsuccessful or incompletely filled-out form.
- When rejection is selected in the cookie panel, advertising tags behave in accordance with the consent status.
- The amounts, currency, and product information passed to the tags are read correctly in the variables.
The preview link can also be shared with another team member; checking from a different device helps catch problems that might be overlooked in a single browser.
Publishing versions and returning to a previous version
Changes made in the workspace do not take effect on the website until they are published using the Submit button. Google’s documentation on publishing, versions, and approvals explains that a version of the container is saved with every publication and that an earlier version can be republished if necessary.
A version is a snapshot of the container at a particular moment. Giving the version a clear name and a short description when publishing makes it easier, months later, to find which change was made, when it was made, and why. The publication history also shows which version was published by whom. If an unusual decrease or increase in measurements appears after a new version, the first thing to check is the changes published on that date.
Consent mode and cookie consent
Consent mode is the mechanism that communicates the consent status given by a visitor in the cookie panel to Google tags, and allows the tags to behave according to that status. Google’s explanation of consent modeemphasizes that this mode does not provide a cookie panel by itself, but works together with an existing panel.
The main consent types affecting Google tags in the current consent mode are as follows:
- ad_storage: Storage of advertising-related cookies and identifiers.
- ad_user_data: Consent to sending user data to Google for advertising purposes.
- ad_personalization: Consent for personalized advertising and remarketing.
- analytics_storage: Storage of analytics cookies, such as those used to measure visit duration.
There are two implementation methods. In basic mode, Google tags are not loaded at all until the visitor interacts with the panel; in advanced mode, tags are loaded, and cookieless signals are sent when consent is denied. In Tag Manager, the default consent status must be defined before tags run and in a way that is consistent with the panel’s update signal. The Turkish Personal Data Protection Authority’s cookie guidelines also stipulate that explicit consent for advertising cookies should be obtained before those cookies are placed.
Note: Consent mode is a technical tool; assessing which cookie will be used on which legal basis requires legal advice, and this article does not provide such advice. For the cookie policy and privacy notice, consulting an advisor specializing in KVKK (Turkey’s Personal Data Protection Law) is recommended.
GTM or directly installed code?
If only a single Analytics code will run on the website and there are no plans to add other tags soon, adding the code directly may be sufficient. When multiple advertising platforms, conversion measurement, and cookie consent management are involved, Tag Manager provides a significant convenience in terms of organization and control.
When making the decision, consider who updates the website and how often. For businesses that frequently launch marketing campaigns, waiting for a developer for every new tag wastes time. On the other hand, dozens of tags added to the container without control can also affect page speed; the performance impact of tags is monitored together with Core Web Vitals measurements. Server-side tagging is a separate option for businesses that want more control over the flow of data and have the appropriate technical infrastructure.
If migrating from directly installed code to Tag Manager, the sequence matters. First, list the existing codes on the website, prepare tags that perform the same functions in the container, and test them in preview. Remove the old codes from the website at the same time as publication; running both setups together for a while causes double counting in the data. Record the migration date so that subsequent changes in reports can be interpreted with this information in mind.
Common Google Tag Manager mistakes
Most errors in Google Tag Manager installations arise because the tool’s convenience leads people to skip testing and organization steps. The most frequently encountered mistakes in practice are as follows:
- Saving changes and forgetting to publish them, resulting in the tag never running on the website.
- Running the same Analytics or pixel code through both Tag Manager and a plugin.
- Connecting the conversion tag to the opening of the form page instead of the form submission.
- Publishing directly without using preview.
- Giving everyone publishing permissions and being unable to track who changed what.
- Running advertising tags without defining the default consent status.
- Leaving old, unused tags in the container.
Although the situations in which tags directly affect search engine visibility are limited, heavy scripts and incorrect redirects can cause technical problems; these types of investigations are addressed as part of technical SEO services for the website.
Let’s bring your measurement setup into one dashboard
You can get in touch every morning from 09:00 onward for Tag Manager installation, organizing a disordered container, or consent mode integration. At the end of installation, a single list explaining which tag measures what is delivered.
Frequently asked questions
Is Google Tag Manager free?
Yes, the standard version of Google Tag Manager is free. The paid Tag Manager 360 version is also offered separately for enterprise needs.
Are Google Tag Manager and Google Analytics the same thing?
No, Google Analytics is the tool that collects and reports data; Google Tag Manager is the system that places and manages various tags on a website, including Analytics. GA4 code can also be added to the website through Tag Manager.
Does using GTM slow down a website?
The container code is lightweight, but every tag added to it places an additional load on the page. Removing unused tags and avoiding unnecessary scripts limits the impact on speed.
Are tests performed in preview mode visible to visitors?
No, the debugging interface is visible only in the browser that started the preview or to people with whom the preview has been shared. Regular visitors continue to see the published version of the website.
What happens if an incorrect version is published?
Select the previous working version from the Versions section and publish it again. Because a version is saved with each publication, reverting can be completed in a few steps.
Does consent mode replace a cookie panel?
No, consent mode does not provide a cookie panel; it communicates the consent status from the existing panel to Google tags. A separate cookie consent management tool must also be installed on the website.
Where should GTM code be added in WordPress?
The code is added through a plugin or the child theme header file, with one snippet in the head section and the other immediately after the body tag. Code written into the parent theme files may be deleted during a theme update.
Call us
Call us for detailed information.
Let us call you!
Share your number and let us call you!
Our other services
- › Corporate web design
- › Ecommerce website development
- › SEO optimization
- › WordPress website development
- › Google advertising management
- › WordPress speed optimization
Service areas
- › Web design in Sakarya
- › Web design in Tekirdağ
- › Web design in Bursa
- › Web design in Beşiktaş
- › Web design in Şişli
- › Web design in Tuzla
- › Web design in Ümraniye
- › Web design in Kadıköy
- › Web design in İstanbul
- › Web design in Ankara
- › Web design in Ataşehir
- › Web design in Üsküdar
- › Web design in Kartal
- › Web design in Maltepe
- › Web design in Pendik
- › Web design in Kocaeli
- › Web design in İzmir
- › Web design in Antalya