Docs menu
Implementation · Tracker
Step-by-Step Implementation Guide
Complete visual guide to implement Sealmetrics tracking on your website, from basic pageviews to conversions and funnels.
This guide walks you through implementing Sealmetrics tracking on your website. By the end, you'll have:
- Basic pageview tracking
- Conversion tracking (purchases, leads, signups)
- Microconversion tracking (add to cart, funnel steps)
- Verified data flowing to your dashboard
Before You Start
What You Need
| Requirement | Where to Find It |
|---|---|
| Sealmetrics Site ID | Settings → Sites → [your site] → General tab |
| Access to your website's HTML | Theme editor, CMS, or code repository |
| 15 minutes | That's all it takes! |
Find Your Site ID
- Log in to my.sealmetrics.com
- Go to Settings → Sites
- Click on your site
- Copy the Site ID from the General tab (use the copy button next to it)
Step 1: Install the Tracking Pixel
1.1 Add the Script Tag
Add this single line to your website's <head> section:
<script src="https://t.sealmetrics.com/t.js?id=YOUR_SITE_ID" defer></script>Replace YOUR_SITE_ID with your actual Site ID.
1.2 Where to Add It
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>My Website</title>
<!-- Add Sealmetrics here, before </head> -->
<script src="https://t.sealmetrics.com/t.js?id=67a1d6c0bb10b861397fdd3a" defer></script>
</head>
<body>
<!-- Your content -->
</body>
</html>1.3 Platform-Specific Instructions
If you can't edit the HTML directly, follow the guide for your platform — each one shows exactly where the snippet goes:
Using something else? See all integrations, or the Installation guide for the manual snippet and its parameters.
Step 2: Verify Installation
2.1 Open Browser DevTools
- Visit your website
- Press
F12(or right-click → Inspect) - Go to Console tab
2.2 Check the Tracker Loaded
Type in console:
typeof sealmetricsExpected result:
"function"If you see "undefined", the script hasn't loaded yet. Check:
- Script URL is correct
- Site ID is valid
- No adblocker interference
2.3 Check Network Requests
- Go to Network tab in DevTools
- Filter by
event - Reload the page
- Look for a POST request to
/event
┌─────────────────────────────────────────────────────────┐
│ Network Filter: event│
├─────────────────────────────────────────────────────────┤
│ Name Status Type Size Time │
│ ───────────────────────────────────────────────────── │
│ event 204 fetch 0 B 45 ms │
│ │
└─────────────────────────────────────────────────────────┘Status 204 = Success! The event was received.
2.4 Inspect the Request Payload
To confirm what is being sent, click the /event request in the Network tab and look at the request payload. It is a form-encoded body with a single field d containing the JSON (account ID a, session ID s, current URL u, timezone z, etc.). For a pageview there is no e/m/v field; those only appear on conversions and microconversions.
You can also read the tracker's own state from the console:
sealmetrics.sessionId; // current session ID
sealmetrics.autoMode; // "1" (auto-pageview on) or "0" (manual)Step 3: Add Content Grouping (Optional)
Content grouping helps you analyze performance by section (blog, products, checkout).
3.1 Add Group Parameter
Modify your script tag to include a group:
<!-- Blog pages -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ID&group=blog" defer></script>
<!-- Product pages -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ID&group=product" defer></script>
<!-- Checkout pages -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ID&group=checkout" defer></script>3.2 Dynamic Grouping (Advanced)
For CMS/dynamic sites, generate the group server-side:
<?php
// Determine content group based on page type
$group = 'general';
if (is_single()) $group = 'blog';
if (is_product()) $group = 'product';
if (is_checkout()) $group = 'checkout';
?>
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ID&group=<?php echo $group; ?>" defer></script>Step 4: Track Conversions
Conversions are goal completions with monetary value: purchases, leads, signups.
4.1 Basic Conversion
sealmetrics.conv('purchase', 99.99);| Parameter | Type | Description |
|---|---|---|
| Type | string | 'purchase', 'lead', 'signup', etc. |
| Amount | number | Monetary value (use 0 for non-monetary) |
4.2 Conversion with Properties
sealmetrics.conv('purchase', 149.99, {
currency: 'EUR',
payment_method: 'credit_card',
coupon: 'SAVE10'
});4.3 Implementation: Thank You Page
The most common pattern is tracking on your order confirmation page.
Static HTML:
<!-- thank-you.html -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ID&group=checkout" defer></script>
<script>
window.addEventListener('load', function() {
sealmetrics.conv('purchase', 149.99, {
currency: 'EUR'
});
});
</script>PHP (WooCommerce, custom):
<script>
window.addEventListener('load', function() {
sealmetrics.conv('purchase', <?php echo $order->get_total(); ?>, {
currency: '<?php echo $order->get_currency(); ?>'
});
});
</script>Shopify:
In Settings → Checkout → Additional scripts:
<script>
window.addEventListener('load', function() {
sealmetrics.conv('purchase', {{ checkout.total_price | money_without_currency | remove: ',' }}, {
currency: '{{ checkout.currency }}'
});
});
</script>4.4 Common Conversion Types
| Type | Amount | When to Use |
|---|---|---|
purchase | Order total | eCommerce checkout complete |
lead | 0 | Contact form submitted |
signup | 0 | Account created |
subscription | Monthly price | SaaS subscription started |
booking | Booking value | Reservation confirmed |
download | 0 | Lead magnet downloaded |
4.5 Prevent Duplicate Conversions
Users might refresh the thank-you page. Prevent duplicates:
Server-side flag
<?php
if (!$order->is_tracked()) {
echo '<script>
window.addEventListener("load", function() {
sealmetrics.conv("purchase", ' . $order->get_total() . ');
});
</script>';
$order->mark_as_tracked();
}
?>Step 5: Track Microconversions
Microconversions are user interactions that indicate progress toward a conversion.
5.1 Basic Microconversion
sealmetrics.micro('add_to_cart');5.2 Microconversion with Properties
sealmetrics.micro('add_to_cart', {
product_id: 'SKU-123',
product_name: 'Blue Sneakers',
price: '89.99'
});5.3 eCommerce Funnel Example
Track the funnel from product view to purchase:
// Step 1: Product viewed (automatic pageview)
// Step 2: Added to cart
document.querySelector('.add-to-cart').addEventListener('click', function() {
sealmetrics.micro('add_to_cart', {
product_id: this.dataset.productId,
price: this.dataset.price
});
});
// Step 3: View cart
// On cart page load:
sealmetrics.micro('view_cart', {
items_count: '3',
cart_value: '267.99'
});
// Step 4: Begin checkout
document.querySelector('.checkout-button').addEventListener('click', function() {
sealmetrics.micro('begin_checkout');
});
// Step 5: Add shipping info
// On shipping form submit:
sealmetrics.micro('add_shipping_info', {
shipping_method: 'express'
});
// Step 6: Add payment info
// On payment form submit:
sealmetrics.micro('add_payment_info', {
payment_method: 'credit_card'
});
// Step 7: Purchase (CONVERSION, not microconversion)
// On thank-you page:
sealmetrics.conv('purchase', 267.99, {
currency: 'EUR'
});5.4 SaaS Funnel Example
// Pricing page: Toggle billing cycle
document.querySelector('.billing-toggle').addEventListener('click', function() {
sealmetrics.micro('toggle_billing', {
selected: this.dataset.cycle // 'monthly' or 'yearly'
});
});
// Pricing page: Click "Start Trial"
document.querySelector('.start-trial').addEventListener('click', function() {
sealmetrics.micro('click_start_trial', {
plan: this.dataset.plan
});
});
// Signup form submitted
document.querySelector('#signup-form').addEventListener('submit', function() {
sealmetrics.micro('signup_started');
});
// Trial started (CONVERSION)
sealmetrics.conv('signup', 0, {
plan: 'pro',
trial: 'true'
});
// Later: Trial converted to paid (CONVERSION)
sealmetrics.conv('subscription', 49, {
plan: 'pro',
billing_cycle: 'monthly'
});5.5 Content Engagement
// Scroll depth tracking
var tracked = {};
window.addEventListener('scroll', function() {
var scrollPercent = Math.round((window.scrollY / (document.documentElement.scrollHeight - window.innerHeight)) * 100);
[25, 50, 75, 100].forEach(function(milestone) {
if (scrollPercent >= milestone && !tracked[milestone]) {
tracked[milestone] = true;
sealmetrics.micro('scroll_' + milestone);
}
});
});
// Video engagement
var video = document.querySelector('video');
video.addEventListener('play', function() {
sealmetrics.micro('video_play', {
video_id: this.dataset.videoId
});
});
video.addEventListener('ended', function() {
sealmetrics.micro('video_complete', {
video_id: this.dataset.videoId
});
});
// Newsletter signup
document.querySelector('#newsletter').addEventListener('submit', function() {
sealmetrics.micro('newsletter_signup', {
position: 'footer'
});
});Step 6: Verify in Dashboard
6.1 Check Data Is Arriving
- Go to my.sealmetrics.com
- Open your site's Overview report
- Visit your website in another tab
- Within seconds, the Last hit timestamp at the top right of the Overview updates and your visit is reflected in the Entrances and Pageviews numbers
6.2 Check Conversions
- Trigger a test conversion on your site
- Go to Conversions report
- Set date range to Today
- Verify your conversion appears
6.3 Check Funnel
- Go to Funnel report
- View microconversions by step
- Analyze drop-off between steps
Complete Implementation Checklist
Basic Setup
- Script added to all pages
- Correct Site ID in script URL
- Verified
typeof sealmetrics === 'function'in console - Verified 204 response in Network tab
- "Last hit" updating on the Overview report
Conversions
- Conversion tracking on thank-you/confirmation page
- Correct amount passed to
sealmetrics.conv() - Deduplication in place (no double-counting)
- Properties include currency if applicable
Microconversions (if applicable)
- Add to cart tracked
- Checkout funnel steps tracked
- Key engagement events tracked (scroll, video, etc.)
Content Grouping (optional)
- Different groups for different page types
- Groups appearing in dashboard reports
Troubleshooting
Script not loading
| Symptom | Solution |
|---|---|
typeof sealmetrics returns undefined | Check script URL, Site ID, no typos |
| 404 error in Network | Verify script URL is exactly correct |
| Script blocked | Check adblocker, CSP headers |
Events not appearing in dashboard
| Symptom | Solution |
|---|---|
| 204 response but no data | Check the Last hit timestamp on the Overview report — if it doesn't move within seconds of a test visit, nothing is arriving (Data Delay). If it does move, check you're looking at the correct account, date range and timezone |
| Non-204 response | Check Site ID, domain authorization |
| Data in wrong account | Verify Site ID in script matches dashboard |
Conversions not tracking
| Symptom | Solution |
|---|---|
| Conversion fires but not in dashboard | Check window.addEventListener('load') wrapper |
| Double conversions | Implement deduplication (Step 4.5) |
| Amount is 0 | Ensure amount is a number, not string |
No request appears in the Network tab
If you do not see a POST to /event:
- Clear browser cache and reload
- Disable browser extensions (ad/tracker blockers)
- Try an incognito window
- Confirm
typeof sealmetrics === 'function'in the console
Next Steps
Now that tracking is set up:
- Set up content grouping to analyze by page type
- Configure alerts for traffic anomalies
- Use LENS AI to ask questions about your data
- Export data for external analysis
Need Help?
- Documentation: sealmetrics.com/docs
- API Reference: Tracker API Reference
- Support: support@sealmetrics.com