How to use Google Tag Manager to monitor sales on your website?
Google Tag Manager how to use it in a first container?
Google Tag Manager how to use it starts with creating the container, installing the two code snippets on the website and publishing the first version. After that step, every new tag goes in through the interface, with no change to the page code.
Which Google Analytics identifier goes into the Google tag?
The Google tag takes the measurement ID of the GA4 (Google Analytics 4) property, which starts with G-. The old tracking ID, used by Universal Analytics, no longer configures the tag.
What happened to Universal Analytics?
Standard UA (Universal Analytics) properties stopped processing hits on July 1, 2023. In the week of July 1, 2024, access to those properties ended and the data was deleted.
Which parameters does consent mode use today?
Consent mode uses ad_storage, analytics_storage, ad_user_data and ad_personalization. The last two arrived in the November 2023 update, and anyone already running the earlier version needs to migrate to v2.
Does Google Tag Assistant replace preview mode?
Google Tag Assistant works alongside container preview mode rather than replacing it. Preview mode shows the firing logic inside the container; Tag Assistant confirms the exchange between the browser and the published tags.
What will you learn in this article?
In this article, you will understand:
- What is Google Tag Manager: the layer that holds the tags, triggers and variables of a website.
- How to configure Google Tag Manager: container, site code, Google tag, trigger and publication.
- Integration with GA4 and Google Ads: measurement ID, purchase event and conversion tracking.
- Validation before publishing: preview mode, Google Tag Assistant and DebugView.
- Consent in practice: the four consent mode parameters and the effect of each refusal.
Measuring sales on a website became a condition for deciding budget, and the first obstacle is almost always technical. Every tool asks for new code on the page, and every request joins the development queue. Knowing how to use Google Tag Manager removes that bottleneck.
Google Tag Manager works as a layer between the website and the measurement and media platforms. Anyone searching for Google Tag Manager how to use really wants to publish a tag on the same day the campaign starts, without opening a technical ticket.
This guide refreshes the step by step with the current product interface, corrects the identifier that goes into the Google tag and opens a dedicated section for consent mode, an item that stopped being a detail in any media operation.
- What is Google Tag Manager and what does it do on a website?
- Why does Google Tag Manager support paid media management?
- How to configure Google Tag Manager step by step?
- How to integrate Google Tag Manager with Google Analytics 4?
- How to connect the container to the Google Ads tag manager?
- How to validate tags with Google Tag Assistant?
- What does consent mode change in website measurement?
- Frequently asked questions about how to use Google Tag Manager
- How to use Google Tag Manager from now on?
What is Google Tag Manager and what does it do on a website?
GTM (Google Tag Manager) is the free Google platform that stores, versions and publishes the measurement code of a website inside a single container. Instead of editing the HTML for every new tool, the team registers tags, triggers and variables through the interface and publishes a version.
Understanding what is Google Tag Manager means separating three pieces. The tag is the snippet that sends data out; the trigger defines the moment of the firing; the variable holds the value the tag needs to read on the page, such as the order total.
- Tags: send data to Google Analytics, to Google Ads and to other measurement platforms.
- Triggers: define the event that releases the firing, such as a page load, a click or a form submission.
- Variables: hold values read on the page, such as transaction identifier, value and currency.
- Versions: record every publication and allow a return to the previous setup without touching the code.
So what Google Tag Manager is for, day to day? It is for publishing measurement without depending on a developer, testing the behavior before activation and switching off a snippet with one click when a tool leaves the contract.
The management layer also changes the routine of whoever owns the inbound marketing strategy. Testing a new form, a contact button or a thank you page stops depending on the next deployment window of the website.
Caption: Knowing how to use Google Tag Manager starts with deciding which signal leaves the container and where it goes.
Why does Google Tag Manager support paid media management?
Google Tag Manager supports paid media management because it keeps measurement consistent across pages and campaigns. With a single container, the remarketing tag, the Google Ads conversion and the purchase event follow the same firing rule, and reports stop diverging between platforms.
Autonomy to publish
The marketing team publishes and edits tags without opening a technical ticket. That gain shortens the test cycle of a digital marketing strategy, because the measurement hypothesis goes live together with the campaign, not three sprints later.
Consistent data across platforms
The container applies the same setup to every page of the website. Consistency reduces duplicated tags, firings at the wrong moment and gaps between the site report and the ads dashboard, three common causes of a wrong decision about budget.
A full view of the funnel
Custom events record a button click, a form submission, a checkout start and a completed purchase. With that level of detail, the inbound sales strategy sees exactly which stage stalls between the first visit and the closed order.
Traffic source and revenue in the same report is what gives the result an owner. Without that reading, a digital marketing strategy argues about visit volume, and the conversation about cost per sale has no basis.
How to configure Google Tag Manager step by step?
Configuring Google Tag Manager takes five steps: create the account and the container, install the two code snippets on the website, create the Google tag with the measurement ID, define the trigger and publish the version. Testing comes before the final publication.
- Create the account and the container, choose the Web platform and keep the container identifier, which starts with GTM.
- Install the two code snippets: the main script as high as possible in the <head> and the noscript snippet right after the opening <body>, as the web container installation requires.
- Create the Google tag and enter the measurement ID of the web data stream of the GA4 property.
- Define the trigger, usually all pages for the base tag and a specific event for each conversion.
- Test in preview mode and only then publish the version, with a description that explains what changed.
The correct identifier for the Google tag
The third step causes the most rework. The field asks for the measurement ID of the property, not the old tracking ID that still circulates in tutorials written before the Google Analytics turning point.
The measurement ID starts with G- and identifies the web data stream inside the property. Anyone copying an old identifier from an outdated document publishes the tag with no visible error and then sees no data at all in the report.
Universal Analytics went offline in two stages. Standard properties stopped processing hits on July 1, 2023 and, in the week of July 1, 2024, access to those properties ended and the data was deleted.
Anyone holding older history has to treat the exported file as a static record, with no expectation of automatic reconciliation. The path to migrate data to Google Analytics 4 still helps whoever organizes a historical series in a spreadsheet.
The data layer before the purchase tag
Before creating the purchase tag, it pays to structure the data layer of the confirmation page. The data layer hands the container the transaction identifier, the value, the currency and the item list, with no fragile reading of the HTML.
That script answers in practice how to use Google Tag Manager for website tracking, from an empty container to the first published event. Order matters: code installed, variable available, tag created, trigger defined and version published.
How to integrate Google Tag Manager with Google Analytics 4?
Integration with GA4 starts with the Google tag inside the container, carrying the measurement ID of the web stream and a trigger on all pages. After that foundation, every business event goes in as its own tag, with the parameters the sales report needs to read.
The Google Analytics 4 property organizes everything by event, including a page view. Anyone coming from the old model of sessions and goals has to relearn the vocabulary, a change unpacked in what changed in Google Analytics 4.
A working Google Analytics setup on the website requires a created property, an active web data stream and a tag loading on every page. Without those three conditions, any purchase event arrives with no destination.
The purchase event
For sales, the central event is purchase, which needs transaction_id, value, currency and the items list. Each item carries name, identifier and price, information that feeds the revenue by product report.
The base tag and the event tag live in the same container. The base tag loads the library on every page; the event tag fires only when the trigger recognizes the order confirmation, with the values already available in the data layer.
Once events start arriving, the report gains depth. The conversion funnel in GA4 shows where the visitor drops off between the product page, the cart and the payment screen.
Mistakes that inflate revenue
A purchase tag without reload control records the same sale twice when the visitor refreshes the confirmation page. The transaction identifier exists precisely so the property can recognize a repeated order.
Step by step installation and setup of Google Analytics 4 on the website.
How to connect the container to the Google Ads tag manager?
Connecting to the Google Ads tag manager uses a conversion tracking tag inside the same container. You enter the conversion identifier and label, point the trigger at the purchase event and publish the version, with no loose code on the confirmation page.
The conversion tag needs two fields that the ads account generates on the conversion tracking screen. The identifier points to the account; the label points to the specific action being counted.
Audiences and remarketing
The same structure feeds the audience for remarketing in Google Ads, which uses website events to build lists. A visitor who opened a product page without buying joins one list; a visitor who bought joins another.
Linking the ads account to the analytics property avoids double reading of the same result. Without the link, a conversion shows up on one platform and disappears on the other, and paid media management loses the cost per sale reference.
The practical gain shows up in the budget. With conversions measured inside the container, the decision to raise or cut spend stops depending on guesswork, a subject explored in paid traffic management.
How to validate tags with Google Tag Assistant?
Validation happens in three layers. Preview mode shows what fires inside the container and which conditions were met, Google Tag Assistant confirms the exchange between the browser and the published tags, and DebugView in GA4 displays the event with every parameter it received.
The Google Tag Manager extension used by Tag Assistant keeps the debugging connection alive while the test walks through login and checkout pages. Without the Google Tag Manager extension installed, the debugging session tends to break in the middle of the purchase flow.
DebugView closes the circuit on the Google Analytics side. It shows the purchase event with value, currency and items exactly as the property will store them, which allows a comparison between the container number and the report number.
The checklist before publishing
- Tag with no trigger: it stays registered and never fires, creating a false sense of active measurement.
- Duplicated firing: the same tag on two triggers inflates both events and revenue in the report.
- Empty parameter: the event arrives without value or currency, and the revenue report stays at zero.
- Broad trigger: rules that are too wide capture pages that do not represent a sale.
Fixing all of this before publication avoids a dirty report and an argument about numbers at month end. The cycle also answers how to use Google Tag Manager for website tracking safely, because nothing reaches production without a check.
What does consent mode change in website measurement?
Consent mode passes the visitor choice to Google tags before any data is sent. Since the November 2023 update there are four parameters in total, and anyone already running the earlier version needs to migrate to v2 of the feature.
The two new parameters deal with advertising. The parameter ad_user_data sets consent for sending user data related to advertising to Google, and ad_personalization sets consent for personalized advertising.
The update is part of strengthening the enforcement of the EU user consent policy. For anyone running a website with European visitors, configuring the four signals becomes part of the implementation, not a later adjustment.
|
Parameter |
What the visitor authorizes |
What happens when the visitor refuses |
|
ad_storage |
Storage tied to advertising, such as ad cookies |
The ad tag stops writing and reading that storage in the browser |
|
analytics_storage |
Storage tied to measurement, such as the visitor identifier |
The event arrives with no persistent identifier kept in the browser |
|
ad_user_data |
Sending user data related to advertising to Google |
User data stops flowing to the advertising platforms |
|
ad_personalization |
Use of the data for personalized advertising |
The campaign stops using that data to personalize the ad |
Table: Consent mode parameters to review when deciding how to use Google Tag Manager on websites with European visitors.
A refusal does not switch the container off. With consent mode active, the container receives the refusal signal and adjusts the behavior of each Google tag according to the parameter that was denied, instead of blocking all measurement at once.
Third party cookies in Chrome
On April 22, 2025, Chrome chose to maintain the current approach to offering users third-party cookie choice and ruled out a new standalone prompt for that type of cookie.
Nothing in that decision sets an end date for the third party cookie. The practical reading for whoever measures sales is different: first party data, sent by the container with the visitor choice on record, weighs more every year in paid media management.
Frequently asked questions about how to use Google Tag Manager
How to use Google Tag Manager from now on?
How to use Google Tag Manager stopped being a question about setup and became a maintenance routine. The container needs a review whenever the website changes template, the checkout gains a step or the ads account creates a new conversion.
Three checks solve most problems: the correct measurement ID in the Google tag, a purchase event carrying the four essential parameters, and consent reflected in the four consent mode signals.
The practical next step is to read the report with audience eyes. See how to segment your audience in GA4 and find out which groups buy, which abandon the cart and which deserve a campaign of their own.




