How to set up Google Tag Manager starts after the container code is already on the site. You add a Google tag, one event that matches a real inquiry, and you publish that version. For a plumber, an HVAC company, or a dentist, that inquiry is the booked call or the finished form. After 19 years in advertising, I still see owners publish a timer and then wonder why the ads learn from a stay on the page.
The setup sequence is straightforward. If the container is not on the site yet, install it first with the guide on how to install Google Tag Manager. The property those events land in is covered in how to use Google Analytics 4. A version you only save does not change what visitors send.
Connect a tag to its trigger and the variables it needs.
Test the real action before release.
Release the version you reviewed.

What a working GTM setup includes
A working GTM setup includes a Google tag on the Initialization trigger, one event tag for a real business action, and a timer or Conversion Linker only when that action needs them. A tag is the piece that sends data. A trigger is the rule for when it sends.
| Piece | What it is for | When I add it |
|---|---|---|
| Google tag | Sends the visit to Analytics | Once the container is on the site |
| GA4 event | Records one business action | When a click, a form, or a thank-you page is the inquiry |
| Timer | Records time on the page | When I want a stay, not a sale |
| Conversion Linker | Stores the ad click for a later conversion | Only if no Google tag loads on every page |
How I design a GTM container
I treat the container as a system of agreements, not a folder of tags. For each item I record purpose, firing condition, consent dependency and business owner, then enforce one naming structure. That lets me read the container without opening every tag and separate production setup from temporary tests.
How to add Google Analytics while setting up GTM
To add Google Analytics while setting up GTM, create a Google tag, paste the Measurement ID into the Tag ID field, and select the Initialization trigger for all pages. Google’s steps for the Google tag assume the container is already installed. For Analytics, the Tag ID is the Measurement ID. It starts with G- and then letters and numbers.
- In Analytics, open Admin. Under Data collection and modification, open Data streams. You need Editor access on the property, or a higher role.
- Open the Web tab and click the web stream. The Measurement ID is in the first row of the stream details. Paste that ID into the Tag ID field.
- Under Triggering, select the Initialization trigger for all pages. The Consent Initialization trigger is only for the tag that sets consent.
- Save. The tag is still only in your workspace. Visitors do not send it until you publish.
The Measurement ID path is on Google’s Measurement ID page. The same tag is covered in how to install Google Analytics 4 with Tag Manager.
How to add Meta (Facebook) Pixel in Google Tag Manager
To add the Meta (Facebook) Pixel in Google Tag Manager, create a Custom HTML tag, paste the base pixel code, and attach an All Pages trigger for that base code. A Meta pixel is the third-party tag I am asked for most often. Use a built-in template when Tag Manager already has that type.
- Open Tags, then New. Choose Custom HTML.
- Paste the code the vendor gave you. If the code is JavaScript, it has to sit inside script tags.
- Use All Pages for the base pixel only. An event pixel gets the trigger for that action.
- Save, then open Preview before you publish.
In Preview I look for a second fire. Google’s custom tag page documents Custom HTML. A pixel left in the theme, plus the new tag, counts the same visit twice. Delete one before you publish.
How to add the Conversion Linker tag in GTM
You add the Conversion Linker tag in GTM only when the container does not already load a Google tag, or a Destination tag for that destination, on every page. Google’s conversion linker page says a separate linker is not required in that case. Containers that use Google Ads or Floodlight tags load a Google tag first, before they send events, if that destination tag is not already connected.
The linker reads the click data in the landing URL and stores it in first-party cookies named _gcl_*, such as _gcl_aw and _gcl_gs, and in local storage under the key _gcl_ls. Leave the cookie name, domain, and path alone unless you already use those names. If you change the prefix, set the same prefix on every tag that reads the cookies.
- Open Tags, then New. Choose Conversion Linker.
- For the trigger, use All Pages in most cases.
- Save. Preview the landing page and confirm the linker fired. Then publish with the rest of the container.
How to track that someone stayed on the site for a set time
To track that someone stayed on the site for a set time, create a Timer trigger and enter the interval in milliseconds. The example on Google’s timer trigger is every 5000 milliseconds. I enter 15000 when I want 15 seconds. That number is my choice.
- Open Triggers, then New, and choose Timer. The default event name gtm.timer is fine.
- Set Interval to 15000 and Limit to 1. A blank Limit keeps firing until the person leaves the page.
- Under Enable this trigger when all of these conditions are true, set Page URL contains the path you care about. Page URL is the full address. If it is missing, turn it on under Variables, Built-In Variables, Configure.
- Create a Google Analytics: GA4 Event tag, enter the Measurement ID, and name the event engaged_15s. Attach the timer, then Preview one fire on that page and none on the others.
A plumber who reads the emergency page for 15 seconds has not booked the repair. Actual revenue comes from the booked job, not from dwell time.
How to set up a conversion in Google Tag Manager
To set up a conversion in Google Tag Manager, create a GA4 Event tag for a thank-you page or a button click, test it in Preview, and publish. The conversion I want is the inquiry the business received. A form that stays on the page is a different job. Those steps are in form submit tracking in Google Tag Manager.
For a thank-you page, create a Page View trigger. It fires as soon as the browser starts to load the page, so a bookmark of that address counts again. Choose Some Events. Add one condition: Page Path contains the thank-you path. Every row has to be true together.
For a button, Google’s event setup uses All Elements, then Some Clicks, then Click Text contains the label. A button is often not a link, so Just Links would miss it. If Click Text is missing, turn it on under Variables, Built-In Variables, Configure. Copy the label, including the spaces. Two labels share one Click Text row with the matches regex operator, for example ^(order now|book a consult)$. Google’s regex operators cover that pattern. A second row does not mean or. Google’s click trigger needs every condition row to be true.
- Create a tag of type Google Analytics: GA4 Event. Enter the Measurement ID. Name the event for the inquiry you received. Do not give a lead name to a click that never sent the request.
- Attach the thank-you trigger or the click trigger. Save.
- From the Workspace tab, click Preview. Enter the site URL and click Connect. Do the action once. Confirm the tag fired, and that an ordinary page did not fire it.
- Click Submit. Choose Publish and Create Version, name the version, read Activity History, then click Publish. Create Version alone leaves the live site on the previous version.
In GA4 mark the event as a key event / conversion if that is the business signal. If the same action also feeds Google Ads, verify arrival in DebugView or Tag Assistant, not only a green fire in GTM Preview.
After that event shows in Analytics, open Admin, under Data display, click Events, and click the star next to it. Google’s key event page requires Editor access or higher for an event already received. The Mark as key event toggle is for a new event. The star does not create a Google Ads conversion.
Google’s note on the Google tag says data collection can take up to 30 minutes to start. I check Realtime after that, not in the first minute. DebugView needs extra setup, so I do not start there. If the same event should train Google Ads, use Google Ads conversion tracking setup.
Takeaways on setting up Google Tag Manager
Takeaways on setting up Google Tag Manager are one Google tag, one business action, and a published version.
- One Google tag, on the Initialization trigger for all pages. A Conversion Linker only when that tag is not already on every page.
- One business action. A timer is context, not the booked job.
- Preview the real action, then publish. A saved version is not the live site.
When this does not apply
This setup does not apply in three cases.
You never published. Submit, then Create Version, stores a snapshot and leaves the previous container live. Visitors keep sending the old tags until you choose Publish and Create Version and click Publish.
You set consent to denied for every visitor. Google’s consent mode page says to set that default for the regions where you must ask, not for everyone. A denied default on US visitors who never see a banner drops precise measurement in regions where user consent is not legally required. Where analytics storage is denied, the tag does not write analytics cookies. The longer version is in consent mode for Google Ads.
You are counting the wrong action. A 15-second stay is time on the page. A click that never sends the request is not a booked call. The repair, the appointment, or the finished form is the event worth training your ad bidding algorithms on.
The Tag Manager steps are on this page. The step-by-step version of Google Ads for a business owner is in my book on Google Ads for business owners.
My e-book “19 Google Ads Secrets”: how to get the most out of Google Ads without draining your budget, drawn from real campaigns and tests.
See the book →Questions and answers
Do I still add a Conversion Linker?
Not if a Google tag, or a Destination tag for that destination, already loads on every page. Add the linker when an ad click can land and that tag is missing.
Why did the button tag stay silent?
Just Links ignores a button that is not a link. Match Click Text to the label, including the spaces. Enable Click Text under Built-In Variables if it is missing. A second label as its own condition row prevents the trigger from firing. Use matches regex on one row when two labels should share that trigger.
Preview worked. Why is the live site unchanged?
Preview shows the workspace, including changes you have not published. Choose Publish and Create Version, then Publish. Create Version alone does not update the site. After a real publish, data collection can take up to 30 minutes to start. If the container snippet was never installed, no version you publish can run.