A step-by-step plan to migrate event tracking from ga3 to ga4 without data gaps

A step-by-step plan to migrate event tracking from ga3 to ga4 without data gaps

I remember the first time I had to migrate an entire event tracking setup from Universal Analytics (GA3) to Google Analytics 4 (GA4): it felt like defusing a bomb while trying to keep the lights on. The key to getting it right is planning, mapping and running both systems in parallel until you're confident the new implementation is capturing everything you need. Below is the step-by-step plan I use with clients to migrate event tracking without data gaps — practical, actionable and tested across ecommerce sites, SaaS apps and editorial experiences.

Audit what you currently track

Start by taking inventory. I create a single spreadsheet that lists every event currently firing in GA3. For each event I capture:

  • Event Category, Action, Label
  • Event value (if used)
  • Triggering pages or user flows
  • Whether it’s marked as a Goal / Conversion in GA3
  • Any associated custom dimensions or metrics
  • Export Historical Data: pull a 90–180 day export from GA3 for all events and goals (CSV + BigQuery if you have it). This gives you a baseline for volume and key metrics to compare against GA4 after migration.

    Map GA3 events to GA4 events and parameters

    GA4’s model is event + parameters; there’s no category/action/label trio. Mapping is where most gaps occur. For each GA3 event I decide:

  • GA4 event name (use readable, lowercase snake_case or kebab-case)
  • Which GA3 fields become GA4 parameters (e.g., action → event_name; label → param like link_text)
  • Which parameters are important enough to register as custom dimensions (user, event, or item-scoped)
  • Example mapping table (keeps things unambiguous):

    GA3 CategoryGA3 ActionGA3 LabelGA3 EventGA4 Event NameGA4 Params
    VideoPlayHomepage HeroVideo Playvideo_playvideo_title, video_position

    Decide tagging method: gtag.js vs Google Tag Manager (GTM)

    I recommend using Google Tag Manager where possible — it gives you modular control, versioning and easier debugging. The migration steps differ a little depending on whether you use raw gtag or GTM:

  • If you use gtag.js, implement GA4 gtag snippets in parallel and start sending events immediately.
  • If you use GTM, create new GA4 Configuration and Event tags and reuse existing Data Layer pushes where possible.
  • Whatever you choose, run both GA3 and GA4 tags in parallel (dual tagging) so you can compare data while keeping GA3 as the source of truth until the switch.

    Re-use and enhance your Data Layer

    The most reliable way to port events is to standardize Data Layer pushes. If you already have a structured dataLayer, great — reuse it. If not, I recommend aligning with ecommerce.js or a lightweight custom schema:

  • Use clear keys: event, event_category, event_action, event_label, value, items, user_id
  • Push full context: page_type, product_id, author_id etc. — GA4 parameters are flexible and cheap to add
  • Once the dataLayer is stable, map Data Layer variables in GTM to GA4 Event parameters. This avoids fragile DOM scraping and reduces future maintenance.

    Build GA4 event tags and register key parameters

    Create GA4 Configuration tag first (with measurement ID). Then for each mapped event, create a GA4 Event tag in GTM and add parameters mapped from the Data Layer.

  • Keep event names consistent and descriptive (e.g., sign_up, add_to_cart, purchase)
  • Register important parameters as custom dimensions in GA4 (Admin → Custom Definitions)
  • For conversions, mark the GA4 event as a conversion (or use Google Tag Manager to send conversion-specific events)
  • Tip: Register parameters early. GA4 only surfaces parameters to reports if you register them as custom dimensions/metrics (with 50 event-scoped dimension slots by default).

    Run dual tagging and QA carefully

    Dual tagging = both GA3 and GA4 capturing the same user actions. This is the safety net. For QA:

  • Use GTM Preview mode to confirm Data Layer variables are present and tags fire as expected
  • Use GA4 DebugView (enable debug mode or use the Google Analytics Debugger Chrome extension)
  • Compare event counts and user counts across GA3 and GA4 for 7–14 days — expect differences due to modeling, but volumes should be similar
  • Look at session definitions and filters that could create discrepancies (GA4 sessions are measured differently)
  • Document any systematic differences you expect (e.g., GA4 automatically collects some events like first_open or page_view differently). Don’t chase tiny percentage differences; focus on major mismatches.

    Handle goals, conversions and eCommerce

    Goals in GA3 become Conversions in GA4. For ecommerce, move to GA4 ecommerce events (add_to_cart, begin_checkout, purchase, etc.). Steps:

  • Map GA3 Goals to GA4 event names and parameters
  • For revenue, ensure purchase events include value, currency, transaction_id and items array
  • Set up Purchase as a conversion and verify transaction_id deduplication if you send via both client and server
  • If you rely on enhanced ecommerce, consider migrating to GA4’s ecommerce schema or using Google Tag Manager templates or Measurement Protocol to ensure server-side accuracy.

    Address historical data and reporting gaps

    GA4 won’t import historical UA data. I always keep GA3 accessible for historical reports and create BigQuery exports for both platforms if long-term analysis matters.

  • For continuity, export UA historical data to BigQuery or CSV and keep it as a reference dataset
  • Consider building a reporting layer that stitches UA and GA4 metrics via a unified naming convention (e.g., map old event names to GA4 equivalents in Looker Studio or your BI tool)
  • If you need to maintain dashboards during transition, create joined datasets that tag which platform the data came from and apply normalization rules.

    Consider server-side tracking for resilience

    I’ve started recommending server-side tagging for clients that need more accurate purchase and identity tracking (reduces ad-block impact and improves data control). Key benefits:

  • Server-side Measurement Protocol lets you send authoritative purchase events with transaction_id deduplication
  • It sidesteps some client-side blocking and gives you better control over user_id persistence
  • Start with client-side GA4 and add server-side where it matters (payments, subscription events, identity linkages).

    Rollout, monitor and iterate

    Once QA passes and volumes are within expected ranges, switch your reporting to GA4 conversions and remove GA3-dependent dashboards gradually.

  • Keep both tags active for at least one billing cycle or product release
  • Monitor key funnels, conversion rates and revenue closely for 30–90 days
  • Audit custom dimensions and tweak parameter registration as you discover missing context
  • Set up alerts: use GA4’s custom alerts or your monitoring stack to notify on large drops in event volume or sudden spikes — they’re usually the first sign of a tagging break.

    Common pitfalls to avoid

  • Skipping the mapping step — leads to missing parameters or badly named events
  • Not using a dataLayer — results in brittle selectors and more maintenance work
  • Registering too many custom dimensions — GA4 has limits; prioritize what you actually need in reporting
  • Rushing to turn off UA — keep it live while you validate and gather at least a month of GA4-stable data
  • Migration is less about flipping a switch and more about rebuilding your event taxonomy in a more flexible system. Plan, map, test and monitor — and if you get stuck, look for the cheapest guardrail (dual-tagging or server-side receipts) that will protect your revenue data during the transition.


    You should also check the following news:

    Social Media

    Why most social listening tools miss brand sentiment and how to calibrate them for accuracy

    02/12/2025

    Most social listening dashboards promise a single pane of truth: sentiment over time, share of voice, and a neat green-yellow-red indicator that...

    Read more...
    Why most social listening tools miss brand sentiment and how to calibrate them for accuracy
    Product Reviews

    How to run a product review lab: testing methodology, scoring rubric and publishing cadence

    02/12/2025

    I run a small product review lab at Mediaflash Co where the emphasis is simple: test like a skeptical user, measure like an analyst, and write like a...

    Read more...
    How to run a product review lab: testing methodology, scoring rubric and publishing cadence