Skip to content

Using Google Analytics with Magento

Google Analytics provides detailed statistics about visitor traffic, conversions, and customer behavior. Integrating it with Magento helps you monitor store performance, optimize marketing campaigns, and improve customer experience.

Steps to Enable Google Analytics in Magento

Section titled “Steps to Enable Google Analytics in Magento”
  1. Go to Google Analytics.
  2. Create a new property for your Magento store.
  3. Copy the Tracking ID (UA‑XXXXXXXXX or GA4 ID starting with G-).
  • Magento 2:

    1. Log in to the Magento admin panel.
    2. Navigate to Stores → Configuration → Sales → Google API → Google Analytics.
    3. Set Enable to Yes.
    4. Enter your Tracking ID.
    5. Save the configuration.
  • Magento 1.x:

    1. Log in to the admin panel.
    2. Go to System → Configuration → Sales → Google API → Google Analytics.
    3. Enable Google Analytics and enter your Tracking ID.
    4. Save changes.
  • Log in to Google Analytics.
  • Go to Realtime → Overview.
  • Visit your Magento store in another browser tab.
  • You should see your visit appear in the realtime dashboard.
  • GA4 is the new standard replacing Universal Analytics.

  • Use Google Tag Manager (GTM) or Magento GA4 extensions for enhanced ecommerce tracking.

  • Benefits include:

    • Funnel tracking.
    • Predictive metrics.
    • Real‑time ecommerce reports