Last updated:
October 22, 2026

Website Analytics Setup: Google Analytics 4, Tag Manager, and Beyond

Website analytics setup is the process of installing and configuring tracking tools that measure how visitors find, navigate, and interact with your website. A proper setup with Google Analytics 4 (GA4), Google Tag Manager (GTM), and complementary tools gives you the data needed to improve user experience, optimize marketing spend, and grow your business. Here is a complete guide to getting it right from the start.

What Tools Do You Need for a Complete Analytics Setup?

A robust analytics stack for most websites includes:

  • Google Analytics 4 (GA4): Your primary analytics platform for traffic, user behaviour, conversions, and audience data.
  • Google Tag Manager (GTM): A container that manages all your tracking codes without editing website files directly.
  • Google Search Console: Monitors your organic search performance, indexing status, and technical SEO health.
  • Microsoft Clarity or Hotjar: Heatmaps and session recordings to see how users actually interact with your pages.
  • Google Ads conversion tracking: If you run paid campaigns, link your Google Ads account to GA4.

For WordPress sites using Elementor and Rank Math, Google Site Kit provides a convenient dashboard that connects GA4, Search Console, and other Google services directly in your WordPress admin.

How Do You Set Up Google Tag Manager?

GTM should be the first tool you install because all other tracking codes will be deployed through it:

  1. Create a GTM account and container at tagmanager.google.com. Use one container per website.
  2. Install the GTM snippet on your website. On WordPress, use a lightweight plugin like “GTM4WP” or paste the code in your theme’s header settings. Place the first snippet in the head and the second immediately after the opening body tag.
  3. Verify installation using GTM’s Preview mode. You should see the container firing on every page.
  4. Set up your workspace with clear naming conventions for tags, triggers, and variables.

How Do You Configure Google Analytics 4 Properly?

GA4 is event-based, which is fundamentally different from the old Universal Analytics. Here is how to set it up correctly:

Basic Configuration

  1. Create a GA4 property at analytics.google.com.
  2. Deploy the GA4 Configuration tag through GTM (not a hardcoded script).
  3. Enable Enhanced Measurement to automatically track page views, scrolls, outbound clicks, site search, video engagement, and file downloads.
  4. Set your reporting timezone and currency (IST and INR for Indian businesses).
  5. Link Google Search Console and Google Ads to your GA4 property.

Essential Custom Events

Beyond the automatic events, set up tracking for actions that matter to your business:

Event NameTriggerBusiness Purpose
generate_leadContact form submissionTrack lead generation
click_phoneClick on phone number linkMeasure call intent
click_whatsappClick on WhatsApp buttonTrack WhatsApp enquiries
scroll_depth25%, 50%, 75%, 100% scroll milestonesMeasure content engagement
purchaseOrder completion (e-commerce)Track revenue and conversions

Conversion Setup

Mark your most important events as conversions in GA4. For a service business, this typically includes form submissions, phone clicks, and WhatsApp clicks. For an e-commerce store, add purchase, begin_checkout, and add_to_cart.

How Do You Set Up Google Search Console?

  1. Add your property at search.google.com/search-console using the domain verification method for the most comprehensive data.
  2. Submit your XML sitemap (usually at yourdomain.com/sitemap_index.xml if using Rank Math).
  3. Verify that pages are being indexed correctly using the URL Inspection tool.
  4. Set up email alerts for critical issues like indexing errors or security problems.
  5. Link to your GA4 property to see search query data in your analytics reports.

What Common Analytics Setup Mistakes Should You Avoid?

  • Double-tracking: Installing GA4 both through GTM and directly on the site, resulting in inflated page view counts.
  • Missing filters: Not filtering out internal traffic from your own office IP addresses.
  • No cross-domain tracking: If your site uses subdomains (blog.example.com, shop.example.com), configure cross-domain tracking to unify user journeys.
  • Ignoring consent: In compliance with India’s DPDP Act, implement a cookie consent mechanism that delays analytics tracking until consent is given for non-essential cookies.
  • Not setting up data retention: GA4 defaults to 2-month data retention for event data. Extend this to 14 months in Admin settings.

Frequently Asked Questions

How long does it take to see data in GA4 after setup?

Real-time data appears within seconds of installation. Standard reports take 24-48 hours to populate. Some reports, like the conversion reports and audience insights, need several days of data collection before they become useful. Allow at least two weeks before making decisions based on GA4 data.

Do I still need Google Tag Manager if I use a WordPress analytics plugin?

GTM is recommended even with a plugin because it gives you flexibility to add and modify tracking without changing your website code. You can manage Facebook Pixel, LinkedIn Insight Tag, Hotjar, and any other tracking code from one interface. It also makes it easier to implement advanced tracking like custom events and e-commerce data layers.

What is the best analytics setup for an Indian e-commerce site?

For Indian e-commerce sites, configure GA4 with Enhanced E-commerce tracking via GTM’s data layer. Set up purchase, add_to_cart, begin_checkout, and view_item events. Track payment gateway selection events to understand payment preferences (UPI, cards, net banking). Link Razorpay or Cashfree conversion data where possible and set up INR as your reporting currency.

How do you track conversions from WhatsApp clicks?

Create a GTM trigger that fires when users click your WhatsApp link (wa.me or api.whatsapp.com). Send this as a custom event to GA4 and mark it as a conversion. This is especially important for Indian businesses where WhatsApp is a primary communication channel for enquiries and sales.

Related Articles

Ready to Start Your Project?

Free consultation and custom proposal within 24 hours. No obligation.

Leave a Reply

Your email address will not be published. Required fields are marked *