Back to Blog
Guides

Migrating from Google Analytics 4: A Step-by-Step Guide

GA4's complexity is driving teams away. Here's a practical, step-by-step guide to migrating your analytics to a simpler, privacy-first alternative.

MW

Marcus Webb

Head of Engineering

January 15, 202611 min read

Migrating from Google Analytics 4: A Step-by-Step Guide

Migrating from GA4 takes about 2 weeks: audit your current events, install the new SDK (one script tag, 5 minutes), map GA4 events to simpler equivalents, set up user identification, run both tools in parallel for validation, then remove GA4. You'll gain real-time data (no 48-hour delays), no event sampling, simpler implementation (no Tag Manager needed), and privacy compliance without consent banners.

Google Analytics 4 is powerful. It's also overwhelmingly complex for most teams. The event-based model was a step in the right direction, but the implementation, with its confusing UI, mandatory BigQuery exports for basic queries, and 48-hour data processing delays: has pushed many teams to look for alternatives.

If you've decided to migrate away from GA4, this guide will walk you through the process step by step.

Before You Migrate

Audit Your Current GA4 Setup

Before ripping anything out, document what you're currently tracking:

Standard Events

  • Page views (automatic in GA4)
  • Scrolls (automatic if enhanced measurement is on)
  • Outbound clicks (automatic)
  • Site search (automatic)
  • File downloads (automatic)

Custom Events

  • List every custom event you've created
  • Document the parameters for each event
  • Note which events are used in conversions
  • Identify events used in Google Ads integration

Audiences and Segments

  • Export your audience definitions
  • Note any remarketing audiences tied to Google Ads
  • Document any custom segments you regularly use

Reports and Dashboards

  • Screenshot or export your most-used reports
  • Document any custom explorations
  • Note which Looker Studio dashboards pull from GA4

Decide What to Keep

Not everything in GA4 needs to be replicated. This is a good opportunity to clean house:

  • Keep: Events that drive business decisions
  • Drop: Events no one looks at (check the Events report: you'll find plenty)
  • Simplify: Over-parameterized events that could be simpler

The Migration Process

Step 1: Set Up SingleAnalytics (5 minutes)

  1. Create an account at singleanalytics.com
  2. Create a project for your website
  3. Copy your API key

Step 2: Install the Tracking Script

Add the SingleAnalytics script to your website's <head>:

<script
  src="https://api.singleanalytics.com/sa.js"
  data-api-key="YOUR_API_KEY"
  data-host="https://your-api-host.com/api"
  defer
></script>

Framework-specific installation:

Next.js: Add to your app/layout.tsx:

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <script
          src="https://api.singleanalytics.com/sa.js"
          data-api-key="YOUR_API_KEY"
          data-host="https://your-api-host.com/api"
          defer
        />
      </head>
      <body>{children}</body>
    </html>
  );
}

WordPress: Add to your theme's header.php or use a plugin like "Insert Headers and Footers."

Shopify: Add to theme.liquid in the <head> section.

At this point, page views are already being tracked. You'll see data in your dashboard within seconds.

Step 3: Map GA4 Events to SingleAnalytics Events

Here's how common GA4 events translate:

| GA4 Event | SingleAnalytics Equivalent | |---|---| | page_view | Automatic (no code needed) | | scroll | sa.track('scroll', { depth: 90 }) | | click (outbound) | sa.track('outbound_click', { url: '...' }) | | purchase | sa.track('purchase', { value: 49, currency: 'USD' }) | | sign_up | sa.track('signup', { method: 'email' }) | | login | sa.track('login', { method: 'google' }) | | add_to_cart | sa.track('add_to_cart', { product: '...', price: 29 }) | | begin_checkout | sa.track('begin_checkout', { items: 3 }) |

Key differences from GA4:

  1. No predefined event schema: In GA4, events like purchase have specific required parameters. In SingleAnalytics, you define whatever properties make sense for your business.

  2. Flat properties: GA4 has items arrays and nested parameters. SingleAnalytics uses flat key-value pairs (strings, numbers, booleans). This is simpler and covers 99% of use cases.

  3. No parameter limits: GA4 limits you to 25 custom parameters per event. SingleAnalytics has no such limit.

Step 4: Set Up User Identification

If you were using GA4's User-ID feature, set up identification in SingleAnalytics:

// After user logs in
sa.identify(user.id, {
  name: user.name,
  email: user.email,
  plan: user.plan
});

// On logout
sa.reset();

This replaces GA4's config call with user_id and user_properties.

Step 5: Set Up Declarative Tracking

For button clicks and link tracking, use HTML data attributes instead of JavaScript:

<!-- Instead of gtag('event', 'cta_click', { location: 'hero' }) -->
<button data-sa-event="cta_click" data-sa-location="hero">
  Get Started
</button>

This replaces the need for Google Tag Manager click triggers for simple tracking scenarios.

Step 6: Create Your Funnels

Recreate any GA4 funnel explorations in SingleAnalytics:

  1. Go to the Funnels tab
  2. Click Create Funnel
  3. Enter your funnel steps as event names

For example, an e-commerce funnel:

page_view, add_to_cart, begin_checkout, purchase

Step 7: Run Both Tools in Parallel (2 weeks)

Don't remove GA4 immediately. Run both tools for at least two weeks to:

  • Verify that page view counts are comparable
  • Confirm all custom events are firing correctly
  • Ensure user identification is working
  • Build confidence in the new data

Expected differences:

  • SingleAnalytics may show 10-30% more page views than GA4 because it doesn't require cookie consent
  • Session counts may differ because SingleAnalytics uses a 30-minute timeout (GA4 uses 30 minutes by default but can vary)
  • User counts will differ because the identification methods are different

Step 8: Remove GA4

Once you're confident in the data:

  1. Remove the GA4 gtag.js script
  2. Remove any Google Tag Manager containers (if GA4 was the only tag)
  3. Remove the cookie consent entry for Google Analytics
  4. Update your privacy policy
  5. Remove any GA4-related npm packages (@analytics/google-analytics, etc.)

What You Gain

After migration, you'll have:

  • Simpler implementation: One script tag, no Tag Manager
  • Real-time data: Events appear in seconds, not 24-48 hours
  • No sampling: GA4 samples data on the free tier; SingleAnalytics doesn't
  • Privacy compliance: No cookies, no consent banner needed for analytics
  • Unified view: Traffic sources and product events in one place
  • Lower complexity: No BigQuery exports needed for basic queries

What You Lose

Be aware of trade-offs:

  • Google Ads integration: If you rely on GA4 for Google Ads conversion tracking, you'll need to keep the Google Ads tag or use the Google Ads API separately
  • Historical data: Your GA4 historical data won't migrate (export it first!)
  • Advanced ML features: GA4's predictive audiences and anomaly detection
  • Free tier scale: GA4 is free for most websites; check SingleAnalytics pricing for your volume

Frequently Asked Questions

Can I keep GA4 for Google Ads and use SingleAnalytics for everything else? Yes. Many teams run a minimal GA4 setup purely for Google Ads conversion tracking while using SingleAnalytics as their primary analytics tool.

How do I export my GA4 historical data? Use GA4's BigQuery export or the GA4 Data API to export your historical data before removing GA4. Store it in your own database or data warehouse.

Will my SEO be affected? No. Analytics tools don't affect SEO. Google Search Console (which is separate from GA4) is the tool that matters for SEO.


Ready to simplify your analytics? Start your SingleAnalytics free trial and see the difference in minutes.

migrationgoogle-analyticsga4setup

Ready to unify your analytics?

Replace GA4 and Mixpanel with one platform. Traffic intelligence, product analytics, and revenue attribution in a single workspace.

Free up to 10K events/month. No credit card required.