Skip to content

Commit 7a1cfda

Browse files
committed
chore: properly exclude reo tracking blog
1 parent fb12ed1 commit 7a1cfda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/reo-script.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ const ReoScript = () => {
1919

2020
// Handle blog post filtering
2121
// Regex handles both URL formats: /blog/slug (default locale) and /locale/blog/slug (non-default locale)
22-
const blogPathMatch = pathname.match(/^(?:\/[^/]+)?\/blog\/([^/]+)$/);
22+
// Also handles optional trailing slash
23+
const blogPathMatch = pathname.match(/^(?:\/[^/]+)?\/blog\/([^/]+)\/?$/);
2324
if (blogPathMatch) {
2425
const slug = blogPathMatch[1];
2526
// Use pre-generated mapping for instant lookup

0 commit comments

Comments
 (0)