Connect Google Analytics 4 and Tag Manager to your site

⏱ Quick answer below · full page ≈ 10 min · skim the bold lead-ins to move faster.
In short. Go to Tools → Google Integrations, paste your GA4 Measurement ID (starts with G-) or GTM Container ID (starts with GTM-) into the matching drawer, flip the Enabled toggle on, and click Save. SGEN injects the tracking script on every public page automatically — no code or theme edits needed.

On this page: Before you start · Steps — connect GA4 · Steps — connect GTM · GA4 vs GTM decision table · Troubleshooting


How to connect Google Analytics 4 and Tag Manager to your site

What is this for?

GA4 tells you what visitors do — which pages they view, how long they stay, which campaigns bring them in, and where they leave. Google Tag Manager (GTM) lets your marketing team add and update tracking pixels (Facebook, TikTok, heatmaps, A/B tests) without touching SGEN for each change.

The two drawers are independent. You can enable GA4 alone, GTM alone, or both at the same time.

Tools - Google Integrations

Your site

Good use cases

  • Campaign performance. GA4 shows which channels drive sign-ups, sales, or form fills — without it, every campaign report is a guess.
  • Marketing self-service. GTM lets your team publish a Facebook pixel, heatmap tool, or A/B test without filing a developer ticket.
  • Checkout analytics. GA4 captures the path from product view to cart to checkout completion, showing you exactly where visitors drop off.
  • Stakeholder reporting. GA4's page-level reports give stakeholders real traffic data rather than self-attested screenshots.

What NOT to use this for

  • Custom checkout funnels. The integration emits the standard tracking script. Configure purchase events on the Google side, inside Analytics or Tag Manager.
  • Non-Google scripts. This drawer accepts only a Google measurement ID or container ID. For anything else — Hotjar, Clarity, custom scripts — use Settings > Custom Codes.
  • Storing private API keys. These IDs appear in your site's page source on every request. They are public identifiers, not secrets.
  • Per-page tracking suppression. The Enabled toggle is site-wide. To exclude a single page from tracking, configure that exclusion inside GA4 itself.

How this connects to other features

  • Settings > Custom Codes — If you paste a GTM script there and set a container ID in this drawer, your pages will load Tag Manager twice. Pick one place.
  • Tools > Google Integrations — The same page covers Google Maps, Business Profile, and other services. Each panel has its own Save button; saving one does not affect the others.
  • Site Settings > SEO — GA4 reports rely on distinct page titles. If all your pages share the same title, your reports will be unreadable. Configure SEO first.
  • Site Settings > Cookie banner — GA4 sets cookies on every visitor. In the EU and UK, configure a consent banner before turning the integration on.
  • Ecommerce > Checkout — GA4 receives ecommerce events (add to cart, purchase) automatically from the checkout flow — no extra configuration in this drawer.

Before you start

You need:

  1. A GA4 property with a Measurement ID — looks like G- followed by ten alphanumeric characters (e.g. G-ABC123XYZ9). Find it in the GA4 admin under Admin > Data Streams > your web stream > Measurement ID. If you only have a UA- ID, that is the retired Universal Analytics format — create a GA4 property first.
  1. (Optional) A GTM Container ID — looks like GTM- followed by seven alphanumeric characters (e.g. GTM-AB12CD3). Find it in the Tag Manager admin in the top bar of any container.
  1. Admin access to your SGEN site. The Tools menu only appears for admins.

Reality check before you paste:

  • Real Google IDs contain only letters, numbers, hyphens, and underscores — never &, <, >, quote marks, or spaces.
  • Copy the ID only, not the entire <script> tag.
  • Save once per change. Repeated saves of the same unchanged value do nothing.

Google Analytics 4

Your site

Where to go

From the main admin sidebar: Dashboard > Tools > Google Integrations

The Analytics and Tag Manager drawers are the first two panels. They sit side by side on a wide screen and stack on a narrow one.

Steps — connect Google Analytics 4

1. Open the Analytics drawer

Tools > Google Integrations: side-by-side Analytics and Tag Manager drawers (Measurement ID / Container ID fields + Enabled toggles + Save).

Choose Tools → Google Integrations from the admin sidebar. The Analytics panel is already visible on page load. If the measurement ID field is not showing, click the Analytics card to expand.

The drawer has three controls: a text field for the Measurement ID, an Enabled toggle, and a Load via Tag Manager toggle. On a fresh site all three are empty or off.

2. Paste your measurement ID

Copy your Measurement ID from the GA4 admin and paste it into the Measurement ID field. It should start with G- and contain only letters, numbers, hyphens, and underscores. If you accidentally pasted the entire <script> tag, delete everything except the G-XXXXXXXXXX portion.

Google Analytics 4

Your site - filling in

3. Turn the Enabled toggle on

Flip Enabled to on. This tells your public site to emit the GA4 tracking snippet. If you leave Enabled off, the ID is saved but nothing fires on the public side — useful for staging, but pointless once you're live.

Leave Load via Tag Manager off unless your GTM container is already configured to load GA4 itself.

4. Save

Click Save at the bottom of the drawer. The page will refresh briefly and a green banner will confirm "Analytics settings updated successfully."

Settings saved

Analytics settings updated successfully.

5. Confirm the script is live

Open your public homepage in a private browser window (to bypass cache). Right-click → View Page Source and search for your Measurement ID. It should appear inside a <script> block near the top.

If it's there, you're done — Google starts receiving traffic data on the next visit. Real-time data appears in GA4 within a minute; standard reports populate within a few hours.

If it's not there, return to the drawer, confirm the ID is filled in and Enabled is on, and save again.

Steps — connect Google Tag Manager

1. Open the Tag Manager drawer

On the same Tools → Google Integrations page, find the Tag Manager card to the right of Analytics. Click to expand. It has two controls: a Container ID field and an Enabled toggle.

2. Paste your container ID

Copy the GTM-XXXXXXX container ID from the Tag Manager admin (top bar of any container) and paste it into the Container ID field. Confirm the format — GTM- followed by exactly seven letters or digits.

3. Turn Enabled on, save, confirm

Flip Enabled to on, click Save, wait for the green banner, then view your public homepage source and search for your container ID. It should appear inside a <script> block near the top.

Google Tag Manager

Your site - saved

What success looks like

Three signals confirm the connection is live:

  1. The green "Analytics settings updated successfully" banner appeared after clicking Save.
  2. Reloading Tools → Google Integrations shows your ID in the field with Enabled on.
  3. View Page Source on your public homepage contains your ID in a <script> block.
https://your-site.example

Custom public-site preview.

What to do if it does not work

The green banner showed but Analytics is empty after a day. Open your public homepage in a private window with ad-blockers disabled — uBlock, Brave's shield, and Privacy Badger block GA by default. Reload a couple of times, then check GA4 > Reports > Realtime. You should see yourself as a visitor within a minute. If you do, the integration is fine; blocked traffic is the issue. If you don't, verify the Measurement ID exactly matches what's in the GA4 admin.

I clicked Save and nothing seemed to happen. Reload Tools → Google Integrations. If the field is empty, your session may have expired — log out and back in, then save again. If the ID shows but your public source doesn't contain the script, confirm Enabled is on.

The ID in the form shows strange characters like &amp;. Real Google IDs never contain &. Delete the entire field, re-enter a clean ID, and save once. Saving the corrupted value again makes it worse.

My pages are loading Tag Manager twice. Check Settings → Custom Codes. A previous admin may have pasted a GTM script there, causing two containers to load. Remove that snippet and rely on the integration drawer alone.

GA4 is live but I want GTM to handle custom events. In the Analytics drawer, flip Load via Tag Manager on. This tells SGEN not to emit its own GA4 snippet — your GTM container will load GA4 instead. Make sure your GTM container already has a GA4 configuration tag published before flipping this toggle.

Tag Manager is connected but tags aren't firing. SGEN's job is to load the GTM container snippet on every page — nothing more. Whether individual tags fire depends on the triggers and conditions you've configured inside GTM. Use Google's Tag Assistant browser extension to debug; tag configuration is outside SGEN's scope.

Fields

FieldDrawerPurposeFormat
Measurement IDAnalyticsLinks your site to a GA4 property — loads gtag.jsG- + 10 alphanumeric characters
EnabledAnalyticsMaster switch — on = tracking active on every pageOn / Off
Load via Tag ManagerAnalyticsPrevents SGEN from emitting its own GA4 snippet when GTM loads GA4On / Off
Container IDTag ManagerLoads the GTM container script on every pageGTM- + 7 alphanumeric characters
EnabledTag ManagerMaster switch — on = GTM loads on every pageOn / Off

GA4 vs Tag Manager — which do you need?

GoalGA4 aloneGTM needed
See visitor counts, top pages, bounce rateYesNo
Know which campaigns drive sign-upsYesNo
Add a Facebook Pixel without touching SGENNoYes
Run A/B tests on your homepageNoYes
Fire scroll-depth and button-click eventsNoYes — configure in GTM
Track ecommerce checkout completionsYes — auto-firesNo
Let your agency manage all tags without SGEN accessNoYes
Load GA4 via the GTM container (advanced)Yes + Load via GTM toggleYes

Most sites need GA4 only. Add GTM when your team is managing more than two or three external tags, or when they need to ship tag changes faster than developer handoffs allow.

Common mistakes to avoid

  • Pasting the full script tag instead of just the ID. Google shows you a <script> tag; you only want the value inside — G-XXXXXXXXXX or GTM-XXXXXXX.
  • Saving with Enabled off then wondering why data isn't flowing. The save banner fires regardless of Enabled state. Always check the toggle after saving.
  • Having a GTM script in both Custom Codes and the GTM drawer. Double-loading doubles event counts and inflates session numbers. One load only.
  • Checking the wrong GA4 property. Verify your Measurement ID matches the property you're reviewing — find it under GA4 admin → Admin > Data Streams.
  • Clicking Save repeatedly when data doesn't appear. Diagnose first — is Enabled on? Is the script in page source? Is an ad-blocker hiding traffic? Then save once if something changed.
  • Expecting immediate standard reports. Real-time data appears within seconds. Sessions, bounce rate, and geography take one to twenty-four hours.

Tips for keeping your tracking clean

  • One GTM load only. If you use the GTM drawer, remove any GTM snippets from Settings > Custom Codes.
  • Confirm after every save. View Page Source to verify your ID appears in the page head.
  • Pause tracking during major rebuilds. Toggle Analytics off temporarily so test visits don't corrupt your baseline metrics.
  • Use a private window for your own visits. A private window removes your admin session cookie so your own pageviews don't inflate numbers.
  • Save once, verify once. If the first save didn't work, diagnose the cause before saving again.

Data privacy considerations

  • Cookie consent applies. In the EU, UK, and many other jurisdictions you must obtain visitor consent before Google Analytics cookies fire. Configure a consent banner under Site Settings > Cookie banner and set it to block tracking until consent is given.
  • GA4 is not anonymous by default. IP addresses are processed on Google's infrastructure. GA4 has IP anonymization enabled by default since launch, but verify your GA4 property settings to confirm.
  • GTM can load anything. Once a marketing team has GTM container access they can publish tags that process visitor data. Establish an internal approval process — the container's contents are your responsibility.
  • Mention analytics in your privacy notice. Your site's privacy policy should name the analytics tools in use and link to Google's data processing terms.
  • GA4 data retention is configurable. GA4 defaults to two months of event-level retention. Increase this under GA4 → Admin > Data Settings > Data Retention before you need it.

Frequently asked questions

Do I need Tag Manager if I already have GA4 set up? No. GA4 tracks visitors on its own once the Measurement ID is saved and Enabled is on. GTM is an additional layer for managing other tags without touching SGEN for each one. Most small sites use GA4 alone.

Can I have GA4 and Tag Manager active at the same time? Yes. They coexist. GA4 fires its own snippet; GTM loads its container. The only thing to watch is the Load via Tag Manager toggle — if that's on, GA4 defers to the GTM container and won't emit its own snippet.

What if I connect the wrong GA4 property by mistake? Paste the correct Measurement ID over the wrong one and save. The new ID takes effect on the next page load; the old property stops receiving data from your site.

How long until GA4 shows data after I save? Real-time data appears within about thirty seconds. Standard reports (sessions, bounce rate, top pages) populate within a few hours. Geographic breakdowns can take up to twenty-four hours.

My agency wants to manage tracking through GTM — what do I give them? Give them the GTM Container ID to confirm it's the right container. You keep your SGEN credentials; they work entirely on the GTM side. Their tag and trigger changes take effect as soon as they publish in GTM — no further action needed in SGEN.

Can I temporarily disable Analytics without losing my configuration? Yes. Flip Enabled off in the Analytics drawer and save. Your Measurement ID stays saved; tracking stops. Flip it back on when you're ready to resume.

Examples

Connecting GA4 for the first time. Open Tools → Google Integrations. In the Analytics drawer, paste your Measurement ID (e.g. G-ABC123XYZ9), flip Enabled on, leave Load via Tag Manager off, and click Save. Open your site in a private window, view source, and confirm the ID appears in a <script> block. Then open GA4 → Reports → Realtime — within thirty seconds you'll see pageviews confirming the connection is live.

https://your-site.example

Custom public-site preview.

Adding Tag Manager so your team can self-serve. Create a GTM container and copy the Container ID (e.g. GTM-AB12CD3). In SGEN admin under Tools → Google Integrations, open the Tag Manager drawer, paste the ID, flip Enabled on, and save. Verify the container script appears in your site's page source. From that point, every new pixel, A/B test, or heatmap tool gets configured inside GTM — no further changes needed in SGEN.

Fixing double Tag Manager loads. View source on your public homepage and search for gtm.js. If it appears twice, check Settings → Custom Codes — a previous admin may have pasted a GTM script there in addition to the integration drawer. Remove the snippet from Custom Codes, save, and verify source now shows only one GTM load.

Routing GA4 through Tag Manager (advanced). If your GTM container already has a GA4 configuration tag published, flip Load via Tag Manager on in the Analytics drawer. SGEN will stop emitting its own GA4 snippet and defer to GTM. Your public source will show only the GTM script — GA4 data flows through the container.

Analytics drawer — Google Integrations

Scope

This page covers the Analytics drawer in Google Integrations — the GA4 Measurement ID field and the GTM Container ID field. It applies to all SGEN plans that include Google Integrations. It does not cover:

  • Other Google services on the same page (Search Console, Ads, Business Profile, reCAPTCHA) — each is documented separately.
  • GA4 property setup or data stream creation — those happen in the GA4 admin.
  • GTM tag authoring — that happens in the GTM interface; SGEN only loads the container.
  • Custom tracking scripts that aren't GA4 or GTM — use Settings → Custom Codes.

Next steps

  • Connect other Google services — Maps, Business Profile, and reCAPTCHA on the same Tools page.
  • Settings → Custom Codes — for any tracking that isn't a Google ID (Hotjar, Clarity, custom scripts).
  • Site Settings → SEO — populate distinct page titles before reading GA4 page-level reports.
  • Site Settings → Cookie banner — required before GA4 cookies fire for EU/UK visitors.
  • Once GA4 is active, open GA4 → Reports → Realtime and confirm one session flows through — the fastest way to verify the connection end to end.