We first published this guide in January 2024 and have now updated it. The setup steps still work, but several things have changed: GA4 renamed "conversions" to "key events" in March 2024, consent mode v2 became mandatory for EEA traffic, Search Console added AI performance reports and image-search data, and from August 2026 Google began merging the Google tag into Tag Manager. See What has changed since 2024 for every change and what to do about it.
Key takeaways
- Three tools, three jobs. Search Console reports your Google search performance, GA4 measures what visitors do on your site, and Tag Manager installs and manages the tracking code.
- Use a Domain property in Search Console. It covers http, https, www and every subdomain in one place, verified with a single DNS record.
- Install Tag Manager once, then add GA4 through it. Two snippets go on every page; after that, tracking changes happen inside Tag Manager instead of in your site's code.
- Change GA4's data retention straight away. It defaults to 2 months for detailed reports. Standard properties can keep 14 months.
- Link Search Console to GA4. It adds organic search query and landing page reports inside Analytics, using up to 16 months of Search Console data.
What do Search Console, Tag Manager and GA4 actually do?
Google Search Console is a free service that shows how your site performs in Google Search: which searches show your pages, how often people click, which pages are indexed and any technical problems Google finds. Google Analytics 4 (GA4) measures what happens on your site: visits, traffic sources, pages viewed, scrolls, form submissions and purchases. Google Tag Manager (GTM) is a free tag management system: you install its code once, then add, edit and test tracking tags (including GA4) from a web interface, without editing your site's code each time.
A simple way to remember it: Search Console covers what happens before someone clicks, GA4 covers what happens after, and Tag Manager is how the tracking gets onto your pages in the first place.
You can use GA4 without Tag Manager by pasting Google's tag straight into your site. For a five-page brochure site that's fine. For anything that will grow, get ad campaigns, or need event tracking, GTM saves time and avoids a pile of code snippets nobody remembers adding.
What the data shows
A few facts explain why so many sites need to revisit their setup now.
Analytics setup in four numbers
The Universal Analytics shutdown pushed millions of sites onto GA4 in a hurry, often by pasting a tag and moving on. Many of those setups still have the default two-month data retention, no conversions configured, internal traffic counted as real visitors and no link to Search Console. None of that breaks the site, but it quietly makes the data less useful.
Search interest: Google Trends, July 2022 to January 2024
We compared "google search console", "google tag manager" and "google analytics 4" in Google Trends (worldwide, web search, data to the week of 21 January 2024). Each line is scored against the busiest week for any of the three, which counts as 100.
- Search Console is the steady one. It's a tool site owners return to every week.
- The GA4 deadline drove a spike. Searches for both GA4 and GTM peaked in the last week of June 2023, then settled.
- The post-deadline dip is misleading. Many of the setups made in that rush need a second look, which is what the rest of this guide is for.
Search Console, GTM and GA4 compared
All three are free. They answer different questions, so most sites need all three.
| Search Console | Tag Manager | GA4 | |
|---|---|---|---|
| Answers | How do people find me on Google? | How does tracking get on my site? | What do visitors do on my site? |
| Data source | Google's own search data | None; it delivers tags | A tag running in visitors' browsers |
| Needs code on your site | Only for verification (or none, with DNS) | Yes, two snippets | Yes, directly or via GTM |
| Key reports | Performance, indexing, Core Web Vitals, links | Preview and debug | Acquisition, engagement, conversions |
| History | 16 months | Version history of your container | 2 or 14 months for detailed reports |
| Who uses it most | SEO, site owners | Marketers, developers | Marketers, owners, analysts |
How the three fit together
Once everything is connected, data flows in a loop that tells you where visitors came from and what they did.
Before you start
Ten minutes of preparation saves an hour of frustration later.
- Use a company Google account. Not a personal Gmail belonging to whoever builds the site. Add at least two people as owners or admins on every tool, so you're never locked out when someone leaves.
- Get access to your domain's DNS. Usually your domain registrar or host. You'll need it for Search Console's Domain property.
- Know how your site is built. WordPress, Shopify, Wix, Squarespace, Webflow or custom code. The installation step differs for each.
- Check for existing tracking. View your page source and search for "gtag", "G-" or "GTM-". Many sites already have an old tag pasted in somewhere; installing a second one doubles every count.
- Check privacy requirements. If you have visitors from the EU, UK or other regions with consent rules, plan a cookie consent banner before you start collecting data.
Step 1: Set up Google Search Console
Search Console doesn't need any tracking code to collect data, because the data comes from Google's own search systems. It only needs proof that you own the site.
Choose a Domain property
Search Console offers two types of property. A Domain property covers every version of your domain: http and https, with and without www, and all subdomains such as shop.example.com. A URL-prefix property covers only one exact address, such as https://www.example.com/. Choose Domain unless you can't edit DNS. Otherwise you can end up looking at only part of your traffic without realising it.
Verify with a DNS record
- Go to Search Console, choose Add property and enter your domain without https or www (for example, example.com).
- Google shows a TXT record that starts with "google-site-verification=". Copy it.
- Sign in to your domain provider, open the DNS settings and add a new TXT record with that value. Some providers, including several large registrars, can add it for you automatically.
- Return to Search Console and click Verify. If it fails, wait. DNS changes can take a while to spread; Google says manually added records can take two or three days in some cases.
Leave the DNS record in place permanently. Search Console rechecks verification from time to time, and if the record is gone, you lose access after a grace period.
If you can't edit DNS
Create a URL-prefix property instead and verify it with one of the other methods: uploading an HTML file to your site's root folder, adding a meta tag to your homepage's head section, or using an existing Google Analytics or Tag Manager installation. Website builders usually provide a field for the meta tag, covered in the platform section below.
Submit your sitemap and add users
Under Sitemaps, submit your sitemap URL. Most platforms create one automatically: Shopify, Wix and Squarespace at /sitemap.xml, WordPress at /wp-sitemap.xml, or /sitemap_index.xml if you use an SEO plugin such as Yoast. Then, under Settings > Users and permissions, add a second owner and give your agency or developer full or restricted access rather than sharing your login.
Step 2: Install Google Tag Manager
Tag Manager uses an account (usually your company) and a container (usually one per website). The container holds all your tags.
Create the account and container
- Go to tagmanager.google.com and create an account with your company name and country.
- Name the container after your website, choose Web as the target platform and create it.
- Google shows two code snippets and a container ID that looks like GTM-XXXXXXX.
Add the two snippets to every page
The first snippet, a <script> block, goes as high as possible inside the <head> of every page. The second, a <noscript> block, goes immediately after the opening <body> tag. Put them in your site's shared header template, not on individual pages, so every current and future page is covered. Then click Submit in Tag Manager to publish an empty first version, which confirms the container is live.
On a website builder, you usually don't paste the snippets yourself. You enter the GTM-XXXXXXX ID in a settings field or a plugin. The platform section below explains how for each one.
Step 3: Set up GA4 and add it through Tag Manager
Create the GA4 property and data stream
- In Google Analytics, go to Admin, create an account if you don't have one, then create a property. Set the reporting time zone and currency correctly; they're used in every report.
- Add a Web data stream with your website's URL.
- Copy the Measurement ID, which starts with G-.
- Leave Enhanced measurement switched on. It records page views, scrolls, outbound clicks, site search, video engagement and file downloads without extra setup.
Add the Google tag in Tag Manager
- In Tag Manager, create a new tag and choose Google tag. Since September 2023 this replaces the older "GA4 Configuration" tag.
- Paste your G- Measurement ID as the tag ID.
- Set the trigger to Initialization – All Pages so it loads before other tags.
- Save, then test in Preview before publishing (see the testing section).
Don't add GA4 both through Tag Manager and directly in your site's code or a plugin. Pick one route. Two GA4 tags means every page view is counted twice.
Five settings to change on day one
- Data retention. Admin > Data settings > Data retention. Change event data retention from 2 months to 14 months. It affects explorations and funnel reports, and you can't recover data that has already expired.
- Internal traffic. Define your office IP addresses as internal traffic under the data stream's tag settings, then activate the internal traffic data filter, so your own team's visits don't inflate the numbers.
- Unwanted referrals. If customers leave your site to pay through a gateway such as Razorpay, PayPal or Stripe and come back, list those domains as unwanted referrals so the sale isn't credited to the payment provider.
- Conversions. Mark the events that matter to your business, such as form submissions, purchases or phone clicks, as conversions.
- Google signals. Turn on only if your privacy policy and consent setup cover it.
Link Search Console to GA4
In GA4, go to Admin > Product links > Search Console links and click Link. You need the Editor role in GA4 and must be a verified owner in Search Console. Choose your Search Console property and your web data stream. Each web stream can link to one Search Console property. Two new reports, Google Organic Search Queries and Google Organic Search Traffic, then become available. They're unpublished by default; add them to your reports menu from the Library.
Platform by platform: CMS and website builders
The steps above are the same everywhere. What changes is where you paste codes and IDs.
WordPress
The simplest route is Google's own plugin, Site Kit by Google. It connects Search Console (and verifies ownership), GA4 and Tag Manager from the WordPress dashboard, and shows key numbers inside WordPress. If you prefer more control, install Tag Manager with a dedicated GTM plugin or by adding the snippets to your theme's header through a child theme, then add GA4 inside Tag Manager. Avoid stacking several analytics plugins; that's the most common cause of double-counting on WordPress sites.
Shopify
Shopify connects GA4 through its Google & YouTube sales channel app, which also sets up standard ecommerce events such as product views, add to cart and purchases. For Search Console, Shopify creates a sitemap at /sitemap.xml automatically; verify with a Domain property or paste the meta tag into your theme's theme.liquid file. Tag Manager can go into theme.liquid for storefront pages, but scripts there don't run on Shopify's checkout. Track checkout and purchase steps with Shopify's Customer events (custom pixels) instead. If you use both the app and your own GTM setup, make sure only one sends GA4 purchase events.
Wix
Wix has built-in integrations for both GA4 and Tag Manager under Marketing Integrations in the dashboard; you enter your G- or GTM- ID and Wix places the code. For Search Console, Wix's SEO setup checklist can connect and verify your site with Google and submit the sitemap for you.
Squarespace
Squarespace has a built-in field in its settings for your GA4 Measurement ID. To install Tag Manager, use Code Injection to add the head snippet in the header and the noscript snippet at the start of the footer injection, which is available on plans that support code injection. Search Console can be connected from Squarespace's analytics area, which also verifies the site.
Webflow
Webflow's site settings include a Google Analytics field for your GA4 Measurement ID and a Google Site Verification field for the Search Console meta tag. Add Tag Manager through the site-wide custom code settings: the head snippet in the head code area and the noscript snippet at the start of the body code area. Custom code requires a paid site plan.
Custom-built and hand-coded websites
On a custom site you have full control, which also means full responsibility. A few rules keep it clean.
- Use the shared layout. Put the GTM head snippet in your main layout or header template, high in the head, and the noscript snippet right after the opening body tag. In frameworks such as Next.js, Nuxt or Laravel, that's the root layout file.
- Verify Search Console by DNS. It doesn't depend on your code, so a redesign can't break it.
- Handle single-page apps. If your site changes pages without full reloads (React, Vue, Angular), GA4's enhanced measurement can record page views on browser history changes. Check that the "page changes based on browser history events" option is on, and test that each route records exactly one page view.
- Use a data layer for important events. Push events such as form submissions or purchases to
window.dataLayerfrom your code, and let Tag Manager turn them into GA4 events. It's sturdier than relying on button clicks that break when the design changes. - Keep staging separate. Don't let test or staging sites send data to your live GA4 property. Use a separate container or environment, or block tags outside the live domain.
How to check everything works
Never assume tracking works because the code is installed. Test it.
-
Use Tag Manager's Preview mode
Click Preview in Tag Manager, enter your URL, and Tag Assistant opens your site in debug mode. Check that the Google tag fires on page load and your event tags fire when you complete the actions they track.
-
Watch GA4 Realtime and DebugView
With Preview running, open GA4's Realtime report and Admin > DebugView. You should see your visit, page views and events arrive within seconds.
-
Check for duplicates
In Tag Assistant, confirm there is only one GA4 Measurement ID on the page. Two IDs, or the same ID twice, means double counting.
-
Inspect a URL in Search Console
Use URL Inspection on your homepage to confirm Google can crawl and index it, then check that your sitemap shows as "Success".
-
Publish and recheck the next day
Publish the Tag Manager version with a clear name, such as "GA4 base setup", then check GA4's standard reports the following day.
A note on consent
If your site has visitors from the European Economic Area, Google requires advertisers using its ads features to pass consent signals through consent mode v2 from March 2024. In practice that means a consent banner, from a consent management platform, that tells Google tags whether a visitor accepted or declined analytics and advertising cookies. Most consent platforms have a Tag Manager template that handles this. Set default consent states so they apply before any tags fire, and test both "accept" and "decline" in Preview mode. Even if you don't advertise, collecting analytics data in a way that respects visitors' choices is required by privacy law in many countries.
Setup checklist
Run through this after setup and again after any redesign.
Search Console, GTM and GA4 setup check
- Search Console Domain property verified by DNS
- Sitemap submitted and showing success
- Two owners on every tool
- GTM head and body snippets on every page
- One Google tag with the right G- ID
- No duplicate GA4 tags or plugins
- Data retention set to 14 months
- Internal traffic filtered
- Payment gateways listed as unwanted referrals
- Conversions marked
- Search Console linked in GA4
- Consent banner tested, if required
What to track by business type
The base setup is the same for everyone. What you mark as a conversion depends on how you make money.
Local service businesses
Track contact form submissions, clicks on phone numbers and WhatsApp links, and clicks on directions. Those are your leads.
Online stores
Use GA4's ecommerce events: product views, add to cart, begin checkout and purchase, with order values. On Shopify, the Google & YouTube app covers most of these.
B2B and SaaS
Track demo requests, sign-ups, pricing page visits and downloads of brochures or reports. Mark demo requests and sign-ups as conversions.
Publishers and blogs
Scroll depth, newsletter sign-ups and time spent on articles matter more than single page views. Use Search Console to see which articles bring in search visitors.
Common setup mistakes
We see these on site after site.
- Two GA4 tags. One from a plugin or theme, one from Tag Manager. Every number doubles.
- GTM in the footer. The head snippet must be high in the head, or early visits and quick bounces go unrecorded.
- URL-prefix property for the wrong version. Verifying http://example.com when the site runs on https://www.example.com shows almost no data.
- Leaving retention at 2 months. By the time you need last year's data, it's gone.
- Counting your own team. Without an internal traffic filter, staff visits look like customers.
- Removing the verification tag in a redesign. Search Console access quietly expires.
- Tracking the staging site. Test traffic mixes with real data and can't be removed afterwards.
- Building everything on one person's account. When they leave, so does your access.
What has changed since 2024
This section was added in November 2026. The steps above still apply; these are the changes to know about, in date order.
- March 2024: consent mode v2 enforcement. Google began requiring consent mode v2 signals for its advertising features on EEA traffic. Our consent mode and server-side tracking guide covers setup in detail.
- 27 March 2024: "conversions" became "key events". In GA4, the events you mark as important are now called key events. "Conversion" now refers to key events used to measure and optimise Google Ads. Wherever this guide says "mark as a conversion", mark it as a key event.
- 13 January 2025: GA4 consent settings hub. A central place in GA4 Admin to review consent settings and diagnostics. Check it after any change to your banner.
- 11 March 2026: branded queries filter. Search Console extended its branded query filter to all eligible sites, making it easy to separate searches for your brand name from everything else.
- 3 June 2026: generative AI reports in Search Console. Google introduced Search Console reports showing performance in its generative AI features, with a toggle to control whether your site appears in them. They reached all sites by 31 August 2026.
- 20 August 2026: Google tag and Tag Manager merge. Google announced it would unify the Google tag with Tag Manager, along with a simpler container overview and visual tagging.
- 24 September 2026: image search data. Search Console added a multimodal search filter covering Google Lens, Circle to Search, image uploads and Chrome's "Search this image".
- 12 October 2026: containers can send data directly. Tag Manager containers gained the option to send data straight to Google measurement destinations such as GA4. It's optional; nothing changes until you review and publish the new setup. Test in Preview first.
- 9 November 2026: back and forward navigation. Tags that record page views on history changes now also record a page view when a visitor returns to a page with the browser's back or forward button.
Beyond tracking, two newer guides are worth reading alongside this one: Core Web Vitals and INP, since Search Console reports them, and technical SEO for AI search, since AI crawlers now visit most sites too.
Frequently asked questions
Do I need Google Tag Manager to use GA4?
No. You can add GA4's Google tag directly to your site or through a plugin. Tag Manager is recommended if you'll track events, run ads or expect to add more tags, because changes can then be made without editing your site's code.
What is the difference between Search Console and Google Analytics?
Search Console shows how your site performs in Google Search before anyone clicks: searches, impressions, clicks and indexing. Google Analytics shows what visitors do on your site after they arrive, from any source.
Which Search Console verification method is best?
DNS verification with a Domain property. It covers every version and subdomain of your site and doesn't depend on your website's code, so redesigns can't break it.
Why is my GA4 data double counted?
Usually because GA4 is installed twice, for example by a plugin and by Tag Manager, or hard-coded in the theme as well. Use Tag Assistant to find every Google tag on the page and remove the duplicates.
How long does GA4 keep my data?
Detailed event data used in explorations defaults to 2 months. Standard properties can raise it to 14 months under Admin, Data settings, Data retention. Standard reports aren't affected by this setting.
Can I set this up on Shopify or Wix without code?
Yes. Shopify connects GA4 through its Google & YouTube app, and Wix has built-in integrations for GA4, Tag Manager and Search Console. Custom checkout tracking on Shopify uses Customer events rather than theme code.
Is Google Analytics free?
Yes. Google Analytics 4 is free for almost every business. Google sells a paid version, Analytics 360, for large companies that need higher limits and support.
How can a small business use Google Analytics?
Look at three things each month: where visitors come from (the Traffic acquisition report), which pages they land on, and how many took the actions you care about. Set form submits, phone clicks and WhatsApp clicks as key events, so you can see which channel actually brings enquiries.
Google Analytics kaise use kare?
Har mahine teen cheezein dekhiye: log kahaan se aa rahe hain, kaunse page pe aa rahe hain, aur kitnon ne form bhara, call kiya ya WhatsApp kiya. In teeno actions ko GA4 mein key event bana dijiye, taaki pata chale ki kaunsa channel asli enquiry la raha hai.
The bottom line
Getting Search Console, Tag Manager and GA4 right is an afternoon's work, and it pays off every time you need to know what's working. Verify Search Console with DNS, install Tag Manager once in your site's shared header, add GA4 through it, change the retention setting, filter your own traffic, mark the actions that matter, link Search Console, and test before you trust the numbers. If you'd rather hand it over, our web development team sets up and audits tracking on WordPress, Shopify and custom sites. Book a free consultation and we'll check what your current setup is actually recording.
Sources
- Google Trends, worldwide web search for "google search console", "google tag manager" and "google analytics 4", July 2022 to January 2024.
- Google Search Console Help, "Verify your site ownership". support.google.com
- Google Tag Manager Help, "Set up and install Tag Manager". support.google.com
- Google Analytics Help, "Data retention". support.google.com
- Google Analytics Help, "Search Console integration". support.google.com
- Google Analytics Help, "What's new archive" (in-product help, 30 January 2024; key events, 27 March 2024; consent settings hub, 13 January 2025). support.google.com
- Google Tag Manager Help, announcements and release notes (Google tag in Tag Manager; 20 August 2026 unification; 12 October 2026 container optimisation; 9 November 2026 back/forward cache). support.google.com
- Google Search Central Blog, "Introducing Search generative AI performance reports in Search Console", June 2026. developers.google.com
- Google Search Central Blog, "Announcing web multimodal Search performance reporting in Search Console", 24 September 2026. developers.google.com
- Simo Ahava, "Consent Mode V2 for Google Tags". simoahava.com
This article is for general information only and is not professional advice. Tools, prices and platform rules change often, so please check official sources before acting on it. See our Terms & Conditions.
Want your tracking set up properly the first time?
Talk to our experts. Your first consultation is free.
