Event Properties
Event properties let you attach custom data to conversions and microconversions for deeper analysis.
How Event Properties Work
Properties are sent with each event and stored alongside it:
Event: add_to_cart (microconversion)
├── Standard fields (automatic)
│ ├── timestamp: 2024-01-15T14:32:00Z
│ ├── page_url: /products/widget
│ ├── device: mobile
│ └── country: ES
│
└── Custom properties (you define)
├── product_id: SKU-123
├── product_name: Widget Pro
├── price: 49.99
└── category: electronics
Adding Properties to Events
Conversions
Pass properties as the third parameter to sealmetrics.conv():
sealmetrics.conv('purchase', 149.99, {
product_category: 'electronics',
payment_method: 'credit_card',
shipping_method: 'express',
coupon_code: 'SAVE10',
is_gift: 'false',
items_count: '3'
});
Microconversions
Pass properties as the second parameter to sealmetrics.micro():
sealmetrics.micro('add_to_cart', {
product_id: 'SKU-123',
quantity: '2',
from_wishlist: 'true'
});
Non-Monetary Conversions
Use 0 as the amount for leads, signups, and other non-monetary goals:
sealmetrics.conv('lead', 0, {
form_name: 'contact',
source: 'homepage'
});
Common Property Patterns
Product Properties
sealmetrics.micro('add_to_cart', {
// Identification
product_id: 'SKU-12345',
product_name: 'Wireless Headphones',
product_variant: 'Black',
// Categorization
category: 'Electronics',
subcategory: 'Audio',
brand: 'Sony',
// Pricing
price: '149.99',
original_price: '199.99',
discount_percent: '25',
// Inventory
in_stock: 'true',
stock_level: 'low'
});
Content Properties
sealmetrics.micro('article_read', {
// Identification
content_id: 'article-456',
content_title: 'How to Choose Headphones',
// Categorization
content_type: 'article',
category: 'buying-guides',
tags: 'audio,headphones,wireless',
// Metadata
author: 'jane-smith',
publish_date: '2024-01-10',
word_count: '1500',
read_time: '7',
// Features
has_video: 'true',
has_gallery: 'true'
});
User Action Properties
sealmetrics.micro('begin_checkout', {
// Action context
action_location: 'cart_page',
// State before action
items_in_cart: '3',
cart_value: '249.99',
// Action details
selected_shipping: 'express',
estimated_delivery: '2024-01-18'
});
Using Properties in Reports
Filtering
Filter reports by property values:
Traffic Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Filters:
+ product_category equals "electronics"
+ payment_method equals "credit_card"
Showing: Credit card purchases in Electronics
Breaking Down
Break down metrics by property:
Conversions by Payment Method
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
payment_method Conversions Revenue AOV
──────────────────────────────────────────────────
credit_card 234 €35,100 €150
paypal 89 €11,570 €130
apple_pay 67 €9,380 €140
bank_transfer 23 €4,600 €200
Data Types
All Values Are Strings
Sealmetrics stores all property values as strings:
// Recommended: use strings explicitly
sealmetrics.conv('purchase', 99.99, {
price: '49.99',
quantity: '2',
is_sale: 'true',
discount_percent: '25'
});
Numbers and booleans are automatically converted to strings, so both forms work:
// Also works (auto-converted)
sealmetrics.conv('purchase', 99.99, {
price: 49.99,
quantity: 2,
is_sale: true
});
Dynamic Properties
From Data Layer
Read from an existing data layer:
sealmetrics.conv('purchase', dataLayer[0].orderTotal, {
category: dataLayer[0].productCategory,
brand: dataLayer[0].brand
});
From DOM
Read from page elements:
document.querySelector('.add-to-cart').addEventListener('click', function() {
sealmetrics.micro('add_to_cart', {
product_id: this.dataset.productId,
product_name: this.dataset.productName,
price: this.dataset.price
});
});
From URL Parameters
var params = new URLSearchParams(window.location.search);
sealmetrics.micro('search', {
search_query: params.get('q') || '',
sort_by: params.get('sort') || 'relevance',
page_number: params.get('page') || '1'
});
Debugging Properties
Debug Mode
Add ?debug=1 to any page URL to see tracking events in the browser console:
https://yoursite.com/checkout?debug=1
The console will show all events being sent, including their properties.
Verify in Dashboard
Check properties arrived correctly:
- Go to Reports
- Find your event
- Click to see properties
Troubleshooting
Properties Not Appearing
- Check property names — Use alphanumeric characters and underscores
- Wait for processing — Data can take a few minutes to appear
- Verify with debug mode — Add
?debug=1to see events in console
Wrong Values
- Check data types — All values are stored as strings
- Check encoding — Ensure valid UTF-8 characters
- Check value length — Values over 500 chars are truncated
Missing on Some Events
- Check conditional logic — Properties only sent when defined
- Check timing — Ensure data is available when event fires
- Check errors — Look for console errors before the tracking call