PHPackages                             mageplaza/magento-2-google-analytics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mageplaza/magento-2-google-analytics

AbandonedMagento2-module[Utility &amp; Helpers](/categories/utility)

mageplaza/magento-2-google-analytics
====================================

Google Analytics M2

1.0.3(8y ago)95.1k11[3 PRs](https://github.com/mageplaza/magento-2-google-analytics/pulls)OSL-3.0PHP

Since Apr 9Pushed 1y ago5 watchersCompare

[ Source](https://github.com/mageplaza/magento-2-google-analytics)[ Packagist](https://packagist.org/packages/mageplaza/magento-2-google-analytics)[ RSS](/packages/mageplaza-magento-2-google-analytics/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

Mageplaza Google Analytics 4 - Enchanced eCommerce
==================================================

[](#mageplaza-google-analytics-4---enchanced-ecommerce)

Google Analytics 4 (GA4), launched in October 2020, is a free Google service widely relied upon by webmasters to evaluate the effectiveness of online marketing campaigns, track website traffic, and measure conversion rates over specific periods.

With [Mageplaza Google Analytics 4 Extension for Magento 2](https://www.mageplaza.com/magento-2-google-analytics-pro/), store owners can easily integrate GA4 into their Magento store, making it more convenient to access and leverage Google Analytics’ powerful insights. This extension simplifies setup, allowing you to track key metrics and optimize your online store’s performance effortlessly.

Announcement
------------

[](#announcement)

This **free version** of the Mageplaza Google Analytics 4 extension is **no longer supported** and may come with unwanted bugs and outdated features.

But don’t worry! The new version on our live site now supports the latest GA4, Google Tag Manager (GTM), detailed reports, and will be regularly updated to keep you ahead of the game.

Upgrade your experience with [the updated Mageplaza GA4 version](https://www.mageplaza.com/magento-2-google-analytics-pro/) now!

Highlight features
------------------

[](#highlight-features)

- Compatible with Hyva Theme &amp; API/GraphQL
- Access comprehensive reports on key store metrics
- Analyze customer activity for marketing insights and optimization
- Track Google Ads dynamic remarketing
- Integrate Facebook Pixel for campaign conversion tracking
- Generate a JSON file with one simple click for easy integration
- Comply with Google Consent Mode V2 for privacy regulation compliance

Documentation
-------------

[](#documentation)

- [Installation guide](https://www.mageplaza.com/install-magento-2-extension/)
- [Get Support](https://github.com/mageplaza/magento-2-google-analytics/issues)
- [Contribute on Github](https://github.com/mageplaza/magento-2-google-analytics/)
- [Changelog](https://www.mageplaza.com/changelog/m2-google-analytics.txt)
- [License](https://www.mageplaza.com/LICENSE.txt)

FAQs
----

[](#faqs)

#### Q: I got error: `Mageplaza_Core has been already defined`

[](#q-i-got-error-mageplaza_core-has-been-already-defined)

A: Read solution:

#### Q: My site is down

[](#q-my-site-is-down)

A: Please follow this guide:

How to install
--------------

[](#how-to-install)

### Method 1: Install ready-to-paste package

[](#method-1-install-ready-to-paste-package)

- Download the latest version at [Mageplaza Blog for Magento 2](https://www.mageplaza.com/magento-2-blog/)
- [Installation guide](https://docs.mageplaza.com/kb/installation.html)

### Method 2: Install via composer

[](#method-2-install-via-composer)

Run the following command in Magento 2 root folder

```
composer require mageplaza/magento-2-google-analytics
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

```

### Method 3: Manually install via composer

[](#method-3-manually-install-via-composer)

1. Access to your server via SSH
2. Create a folder (Not Magento root directory) in called: `mageplaza`, then upload the zip package to mageplaza folder. Download the zip package at
3. Add the following snippet to `composer.json`

```
	{
		"repositories": [
		 {
		 "type": "artifact",
		 "url": "path/to/root/directory/mageplaza/"
		 }
		]
	}

```

4. Run composer command line

```
composer require mageplaza/magento-2-google-analytics
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

```

100% Free Google Analytics Extension
------------------------------------

[](#100-free-google-analytics-extension)

Store owners have rights to configure easily and customize in the way you need. [![open source](https://camo.githubusercontent.com/53e9c0d88deeb0298a92a33eacd854ae65c50d31d6a92ef6e9152b1dfdb619ce/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5635672d344248656e454855756c7648505953464b6e51562d72384b307a76537a6f34764c41725171787050527a4d58545f6c6d69585479574a612d63526c4c4869515536585138756e77534f3074526a725f31435846797a5f684e394d74563149485836655f554a5377323939736f354c357452413346617045796f3155766c2d653078584148)](https://camo.githubusercontent.com/53e9c0d88deeb0298a92a33eacd854ae65c50d31d6a92ef6e9152b1dfdb619ce/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f5635672d344248656e454855756c7648505953464b6e51562d72384b307a76537a6f34764c41725171787050527a4d58545f6c6d69585479574a612d63526c4c4869515536585138756e77534f3074526a725f31435846797a5f684e394d74563149485836655f554a5377323939736f354c357452413346617045796f3155766c2d653078584148)

### Additional tracking ID

[](#additional-tracking-id)

Beside the main tracking ID from Google Analytics registration, Magento supports the second tracking ID which allows getting the analytics at the same time without any delay. [![Additional tracking ID](https://camo.githubusercontent.com/4413a304c377c00585c285d55c013d4df9bec419052c1790b0e92c90e4ef90b7/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f474172694f707675307073485f793453704558514c617a6635317358774e31614f7a414d41786b58646a314a627862714735754442684e70656c6f79775376565f35647144764432783379334d62706145557635427663513641567465715250746b6d726274654d474f684a515f4a4a75697a564449693930754e31626a733731744e49512d5741)](https://camo.githubusercontent.com/4413a304c377c00585c285d55c013d4df9bec419052c1790b0e92c90e4ef90b7/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f474172694f707675307073485f793453704558514c617a6635317358774e31614f7a414d41786b58646a314a627862714735754442684e70656c6f79775376565f35647144764432783379334d62706145557635427663513641567465715250746b6d726274654d474f684a515f4a4a75697a564449693930754e31626a733731744e49512d5741)

### Enhance the accuracy of analytics page report

[](#enhance-the-accuracy-of-analytics-page-report)

As administrator, you can enable Enhanced Link Attribution feature to automatically differentiating between multiple links and the same URL on a single page. Thanks to that, your report about driving the traffic becomes more credible. [![google anlyatics](https://camo.githubusercontent.com/3af4b0d912b86ca72d80e45438767c91d402478f9abc75fe592191ef3632f5b7/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f66356a6b496534724245537854356b4c57557132547a495770467a6c476a71574e36376936544a685a6870596a4a7065574f535a6d654c6d4c5a5f496a7750597143576e6147415f6a63304472505257483769414976764c32642d4c506b486f316b5067365f6f37396f4452684642634b4436504358436d5352373438597056466f59636e416975)](https://camo.githubusercontent.com/3af4b0d912b86ca72d80e45438767c91d402478f9abc75fe592191ef3632f5b7/68747470733a2f2f6c68352e676f6f676c6575736572636f6e74656e742e636f6d2f66356a6b496534724245537854356b4c57557132547a495770467a6c476a71574e36376936544a685a6870596a4a7065574f535a6d654c6d4c5a5f496a7750597143576e6147415f6a63304472505257483769414976764c32642d4c506b486f316b5067365f6f37396f4452684642634b4436504358436d5352373438597056466f59636e416975)

### Allow accessing the analytics report via IP anonymization

[](#allow-accessing-the-analytics-report-via-ip-anonymization)

With Google Analytics extension, instead of real IP address, the anonymized IP can be used if you approve to guarantee user’s privacy policy. [![google analytics](https://camo.githubusercontent.com/1dece45511b40a421ea5b82fbf6586e87ecbc7c6d12686b09565223adac7a044/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f54306e717041464e6e645f35676b39514b5054765774386d386f7933716551356152797464724839304c30694838714743496c6450495a6645367351434d56337246794b6a59487643575367627954653172752d5a36666d4f7351344c45503231377a426a485836686c57314c6a5443666e6b6d6e4b44437962305a646c6e336d5a2d5a78442d31)](https://camo.githubusercontent.com/1dece45511b40a421ea5b82fbf6586e87ecbc7c6d12686b09565223adac7a044/68747470733a2f2f6c68362e676f6f676c6575736572636f6e74656e742e636f6d2f54306e717041464e6e645f35676b39514b5054765774386d386f7933716551356152797464724839304c30694838714743496c6450495a6645367351434d56337246794b6a59487643575367627954653172752d5a36666d4f7351344c45503231377a426a485836686c57314c6a5443666e6b6d6e4b44437962305a646c6e336d5a2d5a78442d31)

### Support trace debugging

[](#support-trace-debugging)

Trace Debugging will show extra information on the console with the full tracking snippet while you are following Google Analytics report.

[![report](https://camo.githubusercontent.com/db26063694dcaa724cd441920bb34b1b90d50cd273adc3ee6ea38172cc334370/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f554d6b7456434a7769466d62464a71424656617a5f31532d78477a7a4536716e376c7948356546396d6f6d6c55505451706a544a66464e3070356e444b5f45376c2d527a7a4569754b4d68534643496564723571766d5f6d554e67567467673770517875756570796f356a366e454b354e7831574732656f376e7231763472734c5168775730506c)](https://camo.githubusercontent.com/db26063694dcaa724cd441920bb34b1b90d50cd273adc3ee6ea38172cc334370/68747470733a2f2f6c68342e676f6f676c6575736572636f6e74656e742e636f6d2f554d6b7456434a7769466d62464a71424656617a5f31532d78477a7a4536716e376c7948356546396d6f6d6c55505451706a544a66464e3070356e444b5f45376c2d527a7a4569754b4d68534643496564723571766d5f6d554e67567467673770517875756570796f356a366e454b354e7831574732656f376e7231763472734c5168775730506c)

Other Features
--------------

[](#other-features)

- 100% FREE
- Support multi-store
- Support multi-language
- Easy to custom
- Well-done user guide
- Life-time support and update

CHANGELOG

### Google Analytics

[](#google-analytics)

Released on 2017-06-28 Release notes:

- Update admin configuration
- Update composer package

### Google Analytics v1.0.1

[](#google-analytics-v101)

Released on 2017-04-24 Release notes:

- Edit composer.json to require mageplazamodule-core instead of mageplazacore-m2

### Google Analytics v1.0.0

[](#google-analytics-v100)

Released on 2017-04-09 Release notes:

- Release first version

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 85.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Total

4

Last Release

3199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2810172?v=4)[Sam Ng](/maintainers/imsamthomas)[@imsamthomas](https://github.com/imsamthomas)

![](https://www.gravatar.com/avatar/791d20a969b428c77a439388be23f94f3ce34d9cbc8ecd09bfccdb7e41b5d7ca?d=identicon)[haitv282](/maintainers/haitv282)

---

Top Contributors

[![imsamthomas](https://avatars.githubusercontent.com/u/2810172?v=4)](https://github.com/imsamthomas "imsamthomas (23 commits)")[![brianmageplaza](https://avatars.githubusercontent.com/u/7621931?v=4)](https://github.com/brianmageplaza "brianmageplaza (3 commits)")[![thaopp-mageplaza](https://avatars.githubusercontent.com/u/79692884?v=4)](https://github.com/thaopp-mageplaza "thaopp-mageplaza (1 commits)")

### Embed Badge

![Health badge](/badges/mageplaza-magento-2-google-analytics/health.svg)

```
[![Health](https://phpackages.com/badges/mageplaza-magento-2-google-analytics/health.svg)](https://phpackages.com/packages/mageplaza-magento-2-google-analytics)
```

###  Alternatives

[mageplaza/magento-2-blog-extension

Magento 2 Blog extension

123708.2k5](/packages/mageplaza-magento-2-blog-extension)[mageplaza/magento-2-seo-extension

Magento 2 SEO extension

138506.6k2](/packages/mageplaza-magento-2-seo-extension)[mageplaza/magento-2-product-slider

Magento 2 Product Slider

66221.8k2](/packages/mageplaza-magento-2-product-slider)[mageplaza/module-gdpr

Magento 2 GDPR Extensions

52333.4k1](/packages/mageplaza-module-gdpr)[mageplaza/module-ajax-layered-navigation

Magento 2 Ajax Layered Navigation Extension

40363.2k](/packages/mageplaza-module-ajax-layered-navigation)[mageplaza/module-geoip

Magento 2 GEO IP Extension

19335.9k1](/packages/mageplaza-module-geoip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
