Skip to main content

Magento 2 Integration

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

Requirements

  • Magento 2.4.0+
  • PHP 7.4+ / 8.0+

Installation

Option 1: Manual Installation

  1. Create directory: app/code/SealMetrics/Analytics
  2. Copy extension files to that directory
  3. Run commands:
bin/magento module:enable SealMetrics_Analytics
bin/magento setup:upgrade
bin/magento cache:clean

Option 2: Composer

composer require sealmetrics/module-analytics
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

SettingDescription
EnableTurn tracking on/off
Account IDYour SealMetrics Account ID (required)
Pixel URLCustom pixel domain (optional)
Track Product ViewsEnable view_item events
Track Add to CartEnable add_to_cart events
Track CheckoutEnable begin_checkout events
Track PurchasesEnable purchase conversions

Tracked Events

Automatic Events

EventTypeWhen
pageviewAutoAll pages with content grouping

E-commerce Events

EventTypeProperties
view_itemMicroproduct_name, product_id, sku, price, currency, category, brand
add_to_cartMicroproduct_name, product_id, price, quantity, currency
begin_checkoutMicrocart_total, currency, items_count
purchaseConversionrevenue, currency, payment_method, coupon, items array

Content Groups

Automatic detection based on Magento layout handles:

Page TypeGroup
cms_index_indexhome
catalog_product_viewproduct
catalog_category_viewcatalog
catalogsearch_result_indexsearch
checkout_cart_indexcart
checkout_index_indexcheckout
checkout_onepage_successthankyou
customer_account_*account

Features

Product Tracking

Full product data including brand and category:

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:

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

Add to Cart

Captured via Magento's customer-data events:

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:

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
  • GDPR compliant by design
  • 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