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
Step 1: Create a Google Analytics Account
-
Go to Google Analytics.
-
Create a new property for your Magento store.
-
Copy the Tracking ID (UA‑XXXXXXXXX or GA4 ID starting with
G-).
Step 2: Configure in Magento Admin
-
Magento 2:
-
Log in to the Magento admin panel.
-
Navigate to Stores → Configuration → Sales → Google API → Google Analytics.
-
Set Enable to Yes.
-
Enter your Tracking ID.
-
Save the configuration.
-
-
Magento 1.x:
-
Log in to the admin panel.
-
Go to System → Configuration → Sales → Google API → Google Analytics.
-
Enable Google Analytics and enter your Tracking ID.
-
Save changes.
-
Step 3: Verify Integration
-
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.
Advanced Setup: GA4 + Google Tag Manager
-
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
-