Take your e-commerce store further.

Using the right Magento 2 extension is more essential now than ever. With MagePal, you can rest assured that you are getting the best quality Magento extensions, each line of code are carefully crafted and rigorously tested. Spend less time debugging and more time doing what you do best with MagePal extensions!

Google Tag Manager + Google Analytics 4 for Magento 1

What is Google Tag Manager and GA4 for Magento 1?

Google Tag Manager (GTM) enables Magento 1 merchants to deploy, manage, and maintain third-party marketing tags, conversion pixels, and analytics scripts without editing core template files.

Google Analytics 4 (GA4) provides event-driven measurement and cross-device reporting. With our Google Tag Manager + GA4 Extension for Magento 1, you can capture crucial ecommerce events (view item, add to cart, checkout steps, purchases) and import our ready-to-use GTM container JSON file for fast deployment.

Installation Guide

Step 1 - Manual Installation

  • Download the extension package.
  • Unzip the archive.
  • Copy the contents into your Magento 1 root directory according to the file structure (app/, skin/, etc.).
  • Flush Magento cache under System > Cache Management.

Step 2 - Configure Extension in Magento Admin

  1. Log into your Magento 1 Admin Panel.
  2. Navigate to System > Configuration.
  3. Under the MagePal tab, select Google Tag Manager.
  4. Enter your GTM Container ID (e.g., GTM-XXXXXXX) and enable the extension.

Step 3 - Extension Review

Like our extensions? Would you be kind enough to leave us a Google review? It only takes a minute and we’d be eternally grateful! Just click the link to go to our MagePal Google Business page and leave us your feedback.

Google Tag Manager Account Setting & Configuration

Google Tag Manager Magento 1 GA4 Settings

The quickest way to configure your Google Tag Manager Container is to use our auto-import JSON configuration file for Google Tag Manager. Our configuration (.json) file automatically generates tags, triggers, and variables in your GTM container.

For step-by-step instructions, see our Google Analytics 4 JSON Import Configuration Guide.

Custom Success Page Tracking

If your store uses a custom checkout module or one-page checkout extension, add the following reference block to your theme’s local.xml layout file:

app/design/frontend/<your_package>/<your_theme>/layout/local.xml

<checkout_onepage_success>
    <reference name="magepal_gtm_datalayer">
        <block type="googletagmanager/order" name="magepal_gtm_block_order" />
    </reference>
</checkout_onepage_success>

Replace checkout_onepage_success with your custom success page layout handle if different.

To learn more, visit the Google Tag Manager for Magento 1 Extension page.

Version History | Change Log

Commit history for this repository, grouped by release tags. Merge commits are omitted; commit IDs are included for reference.

Unreleased

  • 2026-07-08 — Fix typo in function name

1.6.2 — 2025-11-21

  • Update datalayer position to match Google’s recommendation

1.6.1 — 2025-03-25

  • Add locale translation
  • Add custom purchase data event

1.6.0 — 2024-04-29

  • Add Custom Domain

1.5.2 — 2023-11-01

  • Add support for older versions of Magento 1 (below 1.7.2)

1.5.1 — 2023-07-18

  • Improve add-to-cart events
  • Add list type

1.5.0 — 2023-07-07

  • Enhance third-party checkout support
  • Trim whitespace from GTM ID
  • Fix minification error

1.4.0 — 2023-06-21

  • Add better support for third-party checkout

1.3.0 — 2023-06-10

  • Add AJAX data layer and fix add-to-cart bugs
  • Add generic data layer

1.2.0 — 2023-06-06

  • Implement new purchase data-layer logic and clean up code

1.1.0 — 2023-06-05

  • Fix checks for checkout objects
  • Add admin refund and purchase events
  • Code cleanup

1.0.4 — 2023-04-20

  • Add the product data element
  • Fix category-page filtering

1.0.3 — 2023-04-04

  • Fix select_item event issues
  • add Amasty Checkout support

1.0.2 — 2023-03-09

  • Update Data.php
  • Update composer.json

1.0.1 — 2023-02-15

  • Fix various bugs

Initial development — 2023-02-08 to 2023-02-09

  • Create the Magento GA4 integration
  • Initial commits

Related Extensions

Get more from your Magento store!

DataLayer for Tag Manager

Whether you are integrating Bing, Facebook, SnapChat, Pinterest, or any other services our extension make it easy.

HTML Minifier for Magento2

Minification is the process of removing all unnecessary characters and spacing from your source code without changing its functionality.

Catalog Hover Image for Magento

Quickly previewing alternative product images on your category list page.

0

Total Downloads

11

years experience with Magento

30+

Magento / Adobe Commerce Extensions

Shop with confidence

With millions of downloads worldwide, install with confidence knowing that our extensions will just work.

Prepare for the future with Google Analytics 4

Is your Magento store ready for the future? Say hello to the new Google Analytics 4, which is built from the ground up with all-new features and advanced machine learning technology.

Learn More