|
Tiempo de lectura
9 min
How to set up GA4 and GTM correctly
Setting up GA4 and GTM correctly means separating two jobs: Google Analytics 4 collects and presents user behavior, while Google Tag Manager lets you deploy and control tags without editing every page's code. The useful foundation is not counting visits, but recording the actions that move a commercial opportunity closer: submitting a form, tapping a phone number, booking an appointment, or completing a purchase. Then you identify those actions as key events, check they are received only once, and remove noise generated by your own team. If this structure fails, reports can look complete without helping you decide which channel, campaign, or page deserves investment. The goal of this guide is a Google web measurement setup you can verify, maintain, and use with judgment.
What GA4 does and what Tag Manager does
GA4 is where you see users, sources, and events. Google Tag Manager (GTM) is the container that fires the tags sending those events. One does not replace the other. GTM detects "form submitted" and sends GA4 a generate_lead; GA4 stores it and you can mark it as a key event.
"Google Tag Manager" and "Google Analytics 4" are huge searches that almost always go to login or Google Help. This guide is the setup for a business: one installation method, events that are contacts, and data that is not inflated. What to count as a lead: measure leads in GA4.
One way to install (or you duplicate)
If you paste the GA4 tag in the code and also load it in GTM, pageviews and leads double. Realtime looks "great". Choose one path. Typical for a business site: one GTM container and, inside it, the Google tag (GA4). Document domain, subdomains, and who publishes changes.
Spain timezone and currency from day one. Review enhanced measurement: an outbound click is not a call. Do not enable everything "just in case".
Events: name and fire what success is
Names in lowercase with underscores, few, stable: generate_lead, lead_call, purchase. Do not mix form_ok, final_lead, and contact_complete for the same thing.
The trigger must be success, not the click. Unique thank-you page, dataLayer event, or app response. A click on Submit with empty fields is not a conversion. In ecommerce, purchase when the order is confirmed and with transaction_id, so reloading "thank you" does not count twice.
Phone (tel:) and WhatsApp are intent. Separate events, not summed into the form as if they were the same.
Internal traffic and junk
Employees, agency, and the owner reloading the homepage distort numbers. In GA4 define internal traffic by IP and test the filter before making it permanent: what you exclude is not recoverable. Bots never fully disappear; spikes from a strange country and zero sequential events deserve suspicion, not a blind cut that removes real users.
Mistakes that break the data
Duplicate tags. Triggers that are too broad. An automatic event and your event for the same action. A thank-you page that fires again on refresh. Campaigns that import an inflated event and "perform" falsely.
Sessions and engagement explain; they do not decide. If there are visits and zero leads, the problem may be audience, message, landing, or measurement. Indicator order: KPIs for the owner.
How to validate (before and after publishing)
GTM Preview: which tag fires, with which variables. GA4 DebugView: the event arrives once, with the agreed name and parameters. Test a good form submit, a half-filled form, and reloading thank you. Mobile and desktop.
Then contrast with reality: is that event the contact sales believes happened? Cross channels with which channel brings customers. Keep a log: date, URL, action, expected event, result. Without that, every plugin or template change leaves you blind again.
Indicators and references for rigorous measurement
The main reference is that GA4 has been the active version of Google Analytics since Universal Analytics sunset in July 2023, so migrating old goals means reframing them as events and marking them as key events when they apply. In the European Union, Consent Mode v2 affects data collection and modeling based on the user's consent choices; readings should therefore consider your banner design and technical implementation. For example, if analytics consent is not granted, do not interpret that absence of data as automatic absence of interest. I would review consent implementation, GA4 firing from GTM, and conversion definitions before comparing periods or calculating cost per lead.
Conclusion
A reliable GA4 and Google Tag Manager setup is not about accumulating events; it is about keeping a verifiable chain between a real user action and a marketing decision. The measurement validation checklist should include a single GA4 tag, events defined by business value, reviewed conversions, treated internal traffic, checked Consent Mode, and documented tests after every change. For example, before increasing spend on a campaign, confirm that the event you attribute to that campaign represents a real submit, call, or purchase and not a simple click. I would review conversions and their cost monthly with Cost per lead: how to calculate it and lower it in your business, without losing sight of each contact's later quality.
Frequently asked questions about how to set up GA4 and GTM correctly
Do I need GTM if I already have GA4 installed?
You do not have to use Google Tag Manager if GA4 is already installed directly in your website code. GTM does make it easier to add, change, and test tags without editing files on every change, as long as the container is well managed. Before installing it, review how GA4 currently loads to avoid duplicating pageviews or events. If you move to GTM, remove or disable the previous Analytics implementation and validate the transition with Preview and DebugView. Keeping a single deployment path reduces errors and simplifies maintenance.
How do I move from Universal Analytics goals to GA4 events?
In GA4, the old Universal Analytics goals are replaced by events you can mark as key events. Start by identifying what made each goal valid: reaching a thank-you page, a confirmed form submit, a purchase, or a phone click. Then create or adapt the event in GTM or GA4, making sure it represents a real action and not just an attempt. Confirm it fires once per action in DebugView and, once validated, mark it as a key event. Do not copy every old goal without checking whether it still matches business priorities.
Why do my GA4 numbers not match reality?
Differences can come from duplicate tags, events that fire more than once, internal traffic filters, cookie consent, ad blockers, or tool discrepancies. It is also common to measure a button click as if it were a confirmed conversion, even when the user did not finish the process. Review the implementation first with GTM Preview mode and GA4 DebugView. Then compare the user journey with what each event records. The point is not that every platform shows the same number, but that each metric has a clear, consistent, verifiable definition.
Can I set it up myself or do I need technical help?
You can do a basic setup if you understand how GA4, Google Tag Manager, and your website conversion processes work. Installing a tag, creating a simple event, and using Preview are accessible with methodology and tests. Technical support is often advisable with dynamic forms, ecommerce, private areas, cross-domain tracking, Consent Mode, or CRM integrations. The main criterion is the risk of measuring an important action incorrectly. If you cannot verify what triggers each event and what data reaches GA4, review the architecture before making investment decisions.
Need a marketing team?
Let’s talk and grow your business

Let's build something remarkable
