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
- Create directory:
app/code/SealMetrics/Analytics - Copy extension files to that directory
- 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
- Go to Admin > Stores > Configuration > SealMetrics > Analytics
- Enable the module
- Enter your Account ID
- Configure tracking options
- 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:
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
- Run
bin/magento module:status - Verify module is enabled
- Clear cache:
bin/magento cache:clean
Tracker not loading
- Check configuration is enabled
- Verify Account ID is set
- Clear frontend cache
- View page source for script
Purchases not tracking
- Check success page loads correctly
- Verify order status is complete
- Check JavaScript console for errors
Performance
- Enable production mode
- Deploy static content
- Enable full page cache