All articles

Technology & AI

Step-by-Step Guide: How to Set Up Google Tag Manager with Google Analytics

By CrossMedia Team · · 3 min read

Learn how to efficiently install Google Analytics using Google Tag Manager with this comprehensive step-by-step guide. This method ensures precise tracking of website performance and visitor behavior, suitable for all skill levels.

Coral and teal blank tags on thin strings fan out from a frosted glass container on a dark navy background

Want to track website performance and visitor behavior with precision? Using Google Tag Manager (GTM) to install Google Analytics is one of the most efficient and scalable methods available. Whether you’re new to tag management or just looking for a faster way to add Google Analytics to your site, this guide will walk you through every step.

What You’ll Need

Before we begin, make sure you have:

  • A Google Tag Manager account
  • A Google Analytics account (preferably GA4)
  • Access to your website’s code or CMS (like WordPress, Shopify, etc.)

Step 1: Create a Google Tag Manager Account

  1. Go to <a href="https://tagmanager.google.com/" target="_blank" rel="noopener">https://tagmanager.google.com/</a>
  2. Click “Create Account”
  3. Enter:
  4. <b>Account Name</b> (usually your business name)
  5. <b>Container Name</b> (your website’s domain)
  6. Choose “Web” as your target platform
  7. Click <b>Create</b> and accept the terms

You’ll be given <b>two snippets of code</b> to add to your site—one for the <head> and one for <body>. Install them manually, or use a plugin if you’re on a CMS like WordPress.

Step 2: Create a Google Analytics 4 Property

  1. Go to <a href="https://analytics.google.com/" target="_blank" rel="noopener">https://analytics.google.com/</a>
  2. Click <b>Admin > Create Property</b>
  3. Follow the steps to name your property and set your time zone
  4. Under <b>Data Streams</b>, select <b>Web</b>
  5. Enter your website URL and name the stream

After this, you’ll receive a <b>Measurement ID</b> (e.g., G-XXXXXXXXXX). Keep this handy.

Step 3: Add GA4 to Google Tag Manager

  1. Go to your GTM Dashboard
  2. Click on <b>“Tags” > “New”</b>
  3. Name your tag (e.g., GA4 Configuration)
  4. Click <b>“Tag Configuration”</b>, then select <b>“Google Analytics: GA4 Configuration”</b>
  5. Paste your <b>Measurement ID</b>
  6. Leave other settings as-is unless you need to customize
  7. Under <b>Triggering</b>, choose <b>“All Pages”</b>
  8. Click <b>Save</b>

Step 4: Preview & Test Your Setup

  1. Click <b>Preview</b> in the top right corner of GTM
  2. Enter your website URL and connect the debugger
  3. Navigate your site while Tag Assistant is running
  4. Check that the GA4 Configuration tag <b>fires on each page load</b>

You can also check in Google Analytics:

  • Go to <b>Admin > Data Streams > Web</b>
  • Click <b>“Realtime”</b> to confirm your visit is being recorded

Step 5: Publish Your Tag

Once you’re confident the tag is working:

  1. Return to the GTM dashboard
  2. Click <b>Submit</b> in the top right
  3. Add a version name (e.g., “Initial GA4 Setup”) and publish

Congratulations! Your website is now tracking data via Google Analytics using Google Tag Manager.

Pro Tips for Enhanced Tracking

  • Want to track specific events (like button clicks, form submissions, or scrolls)? GTM makes this easy with <b>Triggers</b> and <b>Variables</b>.
  • Use <b>Google Tag Assistant</b> (a Chrome extension) for easier debugging.
  • If migrating from Universal Analytics (UA), don’t just copy old tags. GA4 uses an event-based model, so set it up fresh.

Advantages of Using GTM with GA4

FeatureBenefit
No code editingTags are managed in GTM, not in your site’s HTML
FlexibilityEasily add or remove tags for other tools (e.g., Facebook Pixel)
Version controlRoll back or test tags before going live
ScalablePerfect for agencies or multi-site setups

Final Thoughts

Setting up <b>Google Analytics through Google Tag Manager</b> is not just a smart choice—it’s the <b>best practice for modern websites</b>. It simplifies your tracking setup, boosts flexibility, and makes it easier to scale as your business grows.

Need help setting it up or customizing your tracking? <b>CrossMedia offers professional analytics and tag management services</b>—so you can focus on growing, not configuring.

Keep reading

You say it, we do it.

Tell us what you need. We will show you how our team would deliver it.

Book a demo

Or call us: (620) 938-9526hello@crossmediadesigns.com