---
title: "Magento 2"
description: "Install the Sealmetrics Magento 2.4+ (Adobe Commerce) module via app/code for cookieless analytics with product, cart, checkout, and purchase tracking."
canonical_url: "https://docs.sealmetrics.com/integrations/ecommerce/magento"
lang: "en"
date_generated: "2026-09-14T16:17:59.677Z"
source_hash: "47cebabf207744a6a3e2fbc73b1199811f33768448519984b81dbbb998e9a37c"
content_type: "implementation"
owner: "engineering"
llm_priority: "critical"
source_file: "integrations/ecommerce/magento.mdx"
publisher: "Sealmetrics"
---

# Magento 2

Canonical page: https://docs.sealmetrics.com/integrations/ecommerce/magento

Privacy-first, cookieless analytics for Magento 2.4+ (Adobe Commerce).

## Requirements

- Magento 2.4.0+
- PHP 7.4+ / 8.0+

## Installation

Download the module from your Sealmetrics dashboard, under **Settings → Integrations**, then install it by copying its files into `app/code`:

1. Create directory: `app/code/SealMetrics/Analytics`
2. Copy the module files into that directory
3. Run commands:

```bash
bin/magento module:enable SealMetrics_Analytics
bin/magento setup:upgrade
bin/magento cache:clean
```

## Configuration

1. Go to **Admin > Stores > Configuration > Sealmetrics > Analytics**
2. Enable the module
3. Enter your Account ID
4. Configure tracking options
5. Save and clear cache

### Settings

| Setting | Description |
|---------|-------------|
| **Enable** | Turn tracking on/off |
| **Account ID** | Your Sealmetrics Account ID (required) |
| **Pixel URL** | Custom pixel domain (optional) |
| **Track Product Views** | Enable `view_item` events |
| **Track Add to Cart** | Enable `add_to_cart` events |
| **Track Checkout** | Enable `begin_checkout` events |
| **Track Purchases** | Enable purchase conversions |

## Tracked Events

### Automatic Events

| Event | Type | When |
|-------|------|------|
| `pageview` | Auto | All pages with content grouping |

### E-commerce Events

| Event | Type | Properties |
|-------|------|------------|
| `view_item` | Micro | product_name, product_id, sku, price, currency, category, brand |
| `add_to_cart` | Micro | product_name, product_id, price, quantity, currency |
| `begin_checkout` | Micro | cart_total, currency, items_count |
| `purchase` | Conversion | revenue, currency, payment_method, coupon, items array |

## Content Groups

Automatic detection based on Magento layout handles:

| Page Type | Group |
|-----------|-------|
| `cms_index_index` | `home` |
| `catalog_product_view` | `product` |
| `catalog_category_view` | `catalog` |
| `catalogsearch_result_index` | `search` |
| `checkout_cart_index` | `cart` |
| `checkout_index_index` | `checkout` |
| `checkout_onepage_success` | `thankyou` |
| `customer_account_*` | `account` |

## Features

### Product Tracking

Full product data including brand and category:

```javascript
sealmetrics.micro('view_item', {
  product_name: 'Configurable Product',
  product_id: '123',
  sku: 'PROD-123',
  price: '99.99',
  currency: 'EUR',
  category: 'Electronics',
  brand: 'Brand Name'
});
```

### Configurable Products

Selected options are tracked automatically:

```javascript
{
  product_name: 'T-Shirt',
  size: 'Large',
  color: 'Blue',
  // All selected options captured
}
```

### Add to Cart

Captured via Magento's customer-data events:

```javascript
sealmetrics.micro('add_to_cart', {
  product_id: '123',
  product_name: 'Product Name',
  price: '49.99',
  quantity: '2',
  currency: 'EUR'
});
```

### Purchase Tracking

Complete order data on success page:

```javascript
sealmetrics.conv('purchase', 149.98, {
  currency: 'EUR',
  payment_method: 'Stripe',
  coupon: 'SAVE20',
  items: [
    {
      product_id: '123',
      product_name: 'Product',
      sku: 'SKU-123',
      price: '74.99',
      quantity: '2',
      category: 'Category',
      brand: 'Brand',
      size: 'M',
      color: 'Red'
    }
  ]
});
```

## Multi-store Support

- Works with multiple store views
- Configure per-store if needed
- Respects store-specific currency

## Privacy

- No cookies used
- No order IDs stored externally
- No customer data collected
- Designed for GDPR and ePrivacy (self-assessed, see [Compliance](/compliance))
- No consent banner needed

## Troubleshooting

### Module not showing in admin

1. Run `bin/magento module:status`
2. Verify module is enabled
3. Clear cache: `bin/magento cache:clean`

### Tracker not loading

1. Check configuration is enabled
2. Verify Account ID is set
3. Clear frontend cache
4. View page source for script

### Purchases not tracking

1. Check success page loads correctly
2. Verify order status is complete
3. Check JavaScript console for errors

### Performance

1. Enable production mode
2. Deploy static content
3. Enable full page cache

## Related documentation

- [Installation](/implementation/tracker/installation) — how the underlying tracker loads, useful when configuring a custom pixel domain.
- [E-commerce Setup Guide](/implementation/ecommerce-conversion-tracking/ecommerce-setup-guide) — step-by-step setup for the e-commerce funnel events this module emits.
- [WooCommerce](/integrations/ecommerce/woocommerce) — the equivalent integration for WordPress + WooCommerce stores.
- [PrestaShop](/integrations/ecommerce/prestashop) — a sibling self-hosted store integration.
- [Integrations Overview](/integrations) — browse every platform Sealmetrics supports.
