SEO Filter Generator: Automating Unique Meta Tags Across E-commerce Catalog

E-commerce PHP SEO

Case study: how we automated SEO meta tags for thousands of filtered catalog pages — with a single PHP config file and zero manual content work.

When a shopper picks "Sliding · Frameless · Brushed Nickel," the URL changes — and Google treats it as a brand-new page that can rank on its own. Without a unique title and description, that page either gets ignored, duplicated, or assigned a random snippet. We solved this systematically: one PHP config, no manual effort, thousands of unique meta tags generated on the fly.

1. The Problem: What Happens to Filter Pages Without SEO

The client is a US-based online plumbing retailer selling shower doors, mirrors, shower bases, and bath enclosures. Their catalog uses faceted filtering: door type, glass, color, size, mount style. Every filter combination produces a distinct URL:

URL · example
/shower-doors?filter_spec=12,15,33

Google indexes each such URL as a separate page — one that can appear in search results. Without unique content, one of three things happens:

  1. Google ignores the page entirely and skips indexing — all long-tail traffic from that filter combination is lost.
  2. Hundreds of pages share an identical title — Google treats them as near-duplicates and suppresses them in rankings.
  3. Google picks a random piece of on-page text as the snippet — CTR drops because the fragment doesn't match the user's query.
Before the system

Every filtered page in the Shower Doors category had the same title: "Shower Doors | MySite" — regardless of which filters were active.

2. The Solution: A Priority and Role System

The engine rests on two concepts: a numeric priority for each filter group, and a role that controls how its values are phrased in the generated text.

2.1 Priorities: What Makes It Into the Headline First

Each filter group is assigned a priority from 1 (most important) to 8+. The algorithm builds the headline by adding groups in descending priority order until the 60-character limit is reached. Example for the Shower Doors category:

Priority Filter Group Role Appears In
1Door TypeprimaryH1, Title, Description
2Glass TypequalifierH1, Title, Description
3Door StyleprimaryH1, Title, Description
4Color FinishprepositionalH1, Title, Description
5Handle StylesecondaryH1 (if space allows), Description
6Glass ThicknessqualifierH1 (if space allows), Description
7–8Height / WidthdimensionH1 (if space allows), Description

2.2 Roles: How a Value Is Worded in the Output

The role determines the grammatical form of each group's contribution to headlines and descriptions:

Role H1 Example Logic
primarySliding FramelessValues inserted directly — no preposition needed
qualifierClear (desc: "featuring clear glass")Bare in the headline; preceded by "featuring" in descriptions
prepositionalin Brushed NickelPreposition "in" or "with" is prepended automatically
dimension76 in. tallNumeric value with a unit of measurement and direction suffix
secondaryVertical (if it fits)Appended only when the character budget allows
ignored— (never)Technical specs (Watt, Kelvin, CRI, Volt) — no SEO value in headlines
The ignored role is the key to clean output. Shoppers search for "oval LED mirror" — not "1050 lumen 3000K mirror."

3. What Gets Generated on Every Page

For every active filter combination, the system automatically produces four distinct elements:

H1 (on-page headline)
up to 60 chars
Meta Title (browser tab / Google)
up to 60 chars
Meta Description (SERP snippet)
up to 155 chars
Page Description (visible on page)
2–3 sentences

The Page Description follows a fixed three-part structure: a core product phrase → dimensions and secondary details (only if those filters are selected) → a category-specific call to action.

4. Real-World Examples by Category

4.1 Shower Doors — Four Filters Active

Selected: Door Type → Sliding, Door Style → Frameless, Glass Type → Clear, Color Finish → Brushed Nickel.

ElementGenerated Output
H1Sliding Clear Frameless in Brushed Nickel Shower Doors
Meta TitleSliding Clear Frameless Shower Doors | MySite
Meta DescriptionShop Shower Doors — Sliding, clear glass, frameless, in brushed nickel. Quick shipping available.
Page DescriptionBrowse our selection of sliding frameless shower doors, featuring clear glass, finished in Brushed Nickel. Find the perfect fit for your bathroom with easy filtering and quick shipping on qualifying orders.
ℹ️ The Meta Title is trimmed separately to fit 60 characters including the " | MySite" suffix — so "in Brushed Nickel" is dropped there while the H1 retains it.

4.2 Shower Enclosures — Color Only (No Primary Group Selected)

Selected: Color Finish → Satin Gold only.

ElementGenerated Output
H1Shower Enclosures in Satin Gold
Meta TitleShower Enclosures in Satin Gold | MySite
Word-order guard in action

When no primary-role group is selected, the system automatically places the category name first. Without this guard, the output would read "in Satin Gold Shower Enclosures" — grammatically wrong and confusing for both users and search engines.

4.3 Bathtub Doors — Two Color Values at Once

Selected: Door Type → Sliding, Color Finish → Matte Black and Polished Chrome.

ElementGenerated Output
H1Sliding in Matte Black & Polished Chrome Bathtub Doors
Meta TitleSliding in Matte Black Bathtub Doors | MySite
Meta DescriptionShop Bathtub Doors — Sliding, in matte black & polished chrome. Quick shipping available.

Both colors appear in the H1 joined by "&". The Meta Title only has room for the first — but the Meta Description carries both in full.

4.4 Mirrors — LED Specs Ignored, Dimensions Formatted

Selected: Shape → Rectangular, Mirror Type → Single, Mount Style → Flush, Width → 20 in., Height → 28 in., Kelvin → 3000K, Watt → 15, CRI → 90+.

ElementGenerated Output
H1Rectangular Single with Flush Wall Aluminum Vertical Mirrors
Page Description…Available in a width of 20 in. and a height of 28 in.…

Kelvin, Watt, and CRI are absent from every output field — they are marked ignored in the config and never surface to the user.

5. Architecture: Config-Driven, No Coding Required

All business logic lives in a single file — seo_filter_config.php. Adding a new category requires no developer involvement beyond a one-line controller hook:

PHP · seo_filter_config.php (simplified excerpt)
'shower-doors' => [
  'category_name' => 'Shower Doors',
  'cta'           => 'Find the perfect fit for your bathroom',
  'filter_groups' => [
    ['name' => 'Door Type',    'priority' => 1, 'role' => 'primary'],
    ['name' => 'Glass Type',   'priority' => 2, 'role' => 'qualifier'],
    ['name' => 'Color Finish', 'priority' => 4, 'role' => 'prepositional'],
    ['name' => 'Kelvin',       'priority' => 9, 'role' => 'ignored'],
  ],
],

The workflow for launching a new category is four steps — the last one being the only moment a developer is needed:

  1. Copy any existing block inside seo_filter_config.php.
  2. Update the slug, category_name, and cta string.
  3. List the filter groups for the new category, assigning priorities and roles.
  4. Hand the slug to a developer — they connect it to the controller in one line.
⚠️ Changing priorities or roles for existing categories requires no developer. But keep in mind: updated priorities will alter the headlines of already-indexed pages, which can temporarily affect rankings.

6. Edge Cases and Built-In Safeguards

6.1 Character Limit Overflow

If all selected filters exceed 60 characters, the system drops the lowest-priority groups first. Secondary and dimension filters either fit or are skipped gracefully — the headline never gets truncated mid-word. The Meta Title is trimmed independently, accounting for the " | MySite" suffix.

6.2 Multi-Value Filter Groups

A shopper can select two colors simultaneously. Both appear in the H1 joined by "&". If only the first fits the Meta Title's character budget, only the first is shown there — but the Meta Description always carries the full set.

6.3 Self-Descriptive Values — No Word Duplication

Values like "Barrier Free" or "Center Drain" already contain the descriptive noun. The system does not prepend a redundant label, preventing constructions like "threshold threshold" or "Center Drain drain".

6.4 Dimension Formatting by Context

Numeric dimension values receive context-appropriate suffixes depending on where they appear:

LocationOutput Example
H1 — height value✅ 76 in. tall
H1 — width value✅ 34 in. wide
H1 — diameter value✅ 28 in. diameter
Page Description✅ 28 in. (unit only, no direction word)
Duplicated word❌ "28 in. diameter diameter" — never happens

6.5 No Filters Selected

The generator only fires when at least one filter is active. Standard category pages retain their own manually crafted titles and descriptions — the system does not interfere.

7. Results and Key Takeaways

The system was rolled out across five product categories with a combined space of thousands of possible filter combinations. Each one now produces a fully unique set of meta tags automatically.

Complete long-tail coverage

Every filtered catalog page has a unique H1, Title, and Description — no manual content writing, no duplicate snippets.

Content managers work without developers

Priorities, roles, and CTAs are all managed through a single config file. A developer is only needed when a brand-new category slug is wired into the controller.

⚠️
What to watch when scaling

Categories with non-standard grammar — unusual prepositions, irregular plurals, or language-specific constructions — require manual validation of role assignments. The system has no linguistic exception handling built in.

🎯 Key Principles of the System

  • Priorities decide what fits into the headline when the character budget runs out — not the order filters appear in the URL.
  • Roles control grammar: prepositional adds a preposition, qualifier adds "featuring" in descriptions, ignored excludes entirely.
  • The word-order guard prevents nonsensical headlines when no primary-role group is selected — the category name always leads.
  • Technical specs (Watt, Kelvin, CRI, Volt) are always marked ignored — they never appear in any user-facing text.
  • Everything — priorities, roles, CTA copy — lives in one config file, with no changes to core business logic required.