Content Grouping
Content Grouping categorizes pages into logical groups for aggregated analysis. Instead of analyzing individual URLs, you can group related pages (e.g., all blog posts, all product pages) and view metrics for the entire group.
What Content Grouping Does
| Without Content Grouping | With Content Grouping |
|---|---|
/blog/post-1 → 50 views | Blog → 1,200 views |
/blog/post-2 → 30 views | Products → 3,500 views |
/blog/post-3 → 25 views | Checkout → 800 views |
| ... (hundreds of rows) | (5-10 meaningful groups) |
Content grouping enables:
- Conversions by content group
- Bounce rate per section
- Traffic distribution across page types
- Funnel analysis by content type
Two Ways to Set Up Content Grouping
Method 1: URL Parameter (Recommended)
Add the group parameter to the tracker script. The group is set automatically for all pageviews on that page.
<!-- Blog pages -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID&group=blog" defer></script>
<!-- Product pages -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID&group=product" defer></script>
<!-- Checkout flow -->
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID&group=checkout" defer></script>
Method 2: JavaScript API
Set the group dynamically when calling pageview:
sealmetrics({ group: 'blog' });
This is useful when:
- The group depends on page content (not URL structure)
- You're using a SPA with dynamic sections
- You want to override the URL parameter
Setting Up Content Groups in Dashboard
Step 1: Navigate to Settings
- Log in to Sealmetrics
- Select your site from the dropdown
- Click Settings in the sidebar
- Click Properties
Step 2: Add Content Group Rules
You have two options:
Option A: Quick Setup (Recommended for New Sites)
- Click Quick Setup
- Choose a template that matches your site structure:
| Template | Use Case | Example Rules |
|---|---|---|
| E-commerce | Online stores | Products, Categories, Cart, Checkout |
| Blog / Content | Publishers, blogs | Blog Posts, Categories, Authors |
| SaaS / App | Web applications | Dashboard, Settings, Billing |
| Documentation | Docs sites | Getting Started, API Reference, Guides |
| Support Site | Help centers | Help Articles, Knowledge Base, Tickets |
| Marketing Site | Landing pages | Features, Pricing, About, Case Studies |
- Preview the rules
- Click Apply All Rules or add individual rules
Option B: Manual Setup
- Click Add Rule
- Enter:
- Group Name: The label shown in reports (e.g., "Blog Posts")
- URL Pattern: The pattern to match (e.g.,
/blog/*)
- Click Add Rule
URL Pattern Syntax
Use * to match any characters:
| Pattern | Matches | Does Not Match |
|---|---|---|
/blog/* | /blog/my-post, /blog/2025/news | /blogging, /blog |
/products/*/reviews | /products/shoes/reviews | /products/shoes |
/docs/* | /docs/api, /docs/guides/intro | /documentation |
/ | / (homepage only) | /about, /contact |
Step 3: Implement the Tracker
After defining rules in the dashboard, you must also send the group from the tracker.
Option A: Server-Side Rendering
Set the group based on URL pattern on the server:
<?php
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
// Determine content group based on URL
$group = 'other';
if ($path === '/') {
$group = 'homepage';
} elseif (str_starts_with($path, '/blog/')) {
$group = 'blog';
} elseif (str_starts_with($path, '/products/')) {
$group = 'product';
} elseif (str_starts_with($path, '/checkout')) {
$group = 'checkout';
}
?>
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID&group=<?= $group ?>" defer></script>
Option B: Client-Side (SPA)
Set the group when the route changes:
// React with react-router
import { useLocation } from 'react-router-dom';
import { useEffect } from 'react';
function useContentGrouping() {
const location = useLocation();
useEffect(() => {
let group = 'other';
if (location.pathname === '/') {
group = 'homepage';
} else if (location.pathname.startsWith('/blog/')) {
group = 'blog';
} else if (location.pathname.startsWith('/products/')) {
group = 'product';
} else if (location.pathname.startsWith('/checkout')) {
group = 'checkout';
}
if (typeof sealmetrics !== 'undefined') {
sealmetrics({ group });
}
}, [location.pathname]);
}
Option C: CMS-Based
For WordPress, WooCommerce, or other CMS:
<?php
function get_content_group() {
if (is_front_page()) return 'homepage';
if (is_single() && get_post_type() === 'post') return 'blog';
if (is_product()) return 'product';
if (is_cart()) return 'cart';
if (is_checkout()) return 'checkout';
if (is_account_page()) return 'account';
return 'other';
}
?>
<script src="https://t.sealmetrics.com/t.js?id=YOUR_ACCOUNT_ID&group=<?= get_content_group() ?>" defer></script>
Viewing Content Group Reports
Pages Report
- Go to Pages in the sidebar
- The Content Group column shows the assigned group for each page
- Use the Group by dropdown to aggregate by content group
Filtering by Content Group
- Click Add Filter
- Select Content Group
- Choose one or more groups
Common Content Group Structures
E-commerce
| Group | Pattern | Pages |
|---|---|---|
| Homepage | / | Landing page |
| Products | /products/* | Product listings, search results |
| Product Details | /product/* | Individual product pages |
| Cart | /cart | Shopping cart |
| Checkout | /checkout/* | Checkout steps |
| Account | /account/* | User account, orders |
| Blog | /blog/* | Content marketing |
SaaS
| Group | Pattern | Pages |
|---|---|---|
| Marketing | /, /features/*, /pricing | Public pages |
| App | /app/*, /dashboard/* | Authenticated app |
| Settings | /settings/* | User settings |
| Billing | /billing/* | Subscription management |
| Docs | /docs/* | Documentation |
Publisher / Blog
| Group | Pattern | Pages |
|---|---|---|
| Homepage | / | Main page |
| Articles | /articles/*, /news/* | Content pages |
| Categories | /category/* | Topic pages |
| Authors | /author/* | Author pages |
| Archives | /archive/* | Historical content |
Best Practices
Do
- Keep groups meaningful: 5-15 groups is ideal
- Use consistent naming:
blognotBlog Postsorblog-posts - Group by user intent: Separate informational vs transactional content
- Test patterns: Verify URLs match expected groups before going live
Don't
- Over-segment: 50+ groups makes analysis difficult
- Use overlapping patterns:
/products/*and/products/sale/*may conflict - Forget to implement: Dashboard rules require tracker implementation
Troubleshooting
Pages showing wrong content group
- Check the
groupparameter in the tracker script - Verify URL pattern matches in Settings > Properties
- Confirm pattern priority (more specific patterns should have higher priority)
Content group not appearing in reports
- Ensure the tracker includes the
groupparameter - Wait 5 minutes for data processing
- Check that the page has received traffic since adding the group
"Other" or empty content group
Pages without a matching rule or group parameter will show as ungrouped. Either:
- Add a rule to match the URL pattern
- Add a catch-all rule with pattern
/*and name "Other"