Skip to content

Multi hostname#646

Merged
goldflag merged 2 commits intomasterfrom
multi-hostname
Oct 21, 2025
Merged

Multi hostname#646
goldflag merged 2 commits intomasterfrom
multi-hostname

Conversation

@goldflag
Copy link
Copy Markdown
Collaborator

@goldflag goldflag commented Oct 21, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Funnels now support per-step hostname filtering with auto-suggestions for faster configuration.
    • Added ability to remove steps from funnels—use the delete button in each step row (disabled when fewer than 3 steps).
  • Style

    • Refined label styling and input field layout adjustments for improved visual consistency.

- Updated FunnelStep type to include an optional hostname property for better event tracking.
- Modified FunnelForm component to fetch and display hostname suggestions alongside paths and events.
- Adjusted SQL query in getFunnel function to filter results based on the hostname if provided.
- Improved UI elements for better layout and user experience in the FunnelForm component.
@goldflag goldflag merged commit 496c192 into master Oct 21, 2025
4 checks passed
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Oct 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR adds hostname filtering capability to funnel analytics steps across client and server. It includes UI enhancements to the funnel form with hostname input field, step removal buttons, and styling adjustments. Backend logic now supports per-step hostname constraints during funnel computation.

Changes

Cohort / File(s) Summary
Type Definitions
client/src/api/analytics/funnels/useGetFunnel.ts, server/src/api/analytics/funnels/getFunnel.ts
Added optional hostname?: string field to FunnelStep type
Funnel Form UI
client/src/app/[site]/funnels/components/FunnelForm.tsx
Added hostname input field with suggestions via useSingleCol, step removal buttons (disabled when ≤2 steps), adjusted container margins, card and badge styling, height constraints, and help text placement
Funnel Backend Logic
server/src/api/analytics/funnels/getFunnel.ts
Implements per-step hostname filtering by constructing conditional hostname filters, propagating hostname through query CTEs, and updating UserActions selection to include hostname
Component Styling
client/src/components/ui/input-with-suggestions.tsx, client/src/components/ui/label.tsx
Removed w-full width constraint from InputWithSuggestions wrapper; updated label color from text-neutral-500 to text-neutral-400 and removed font-medium
Configuration
client/src/app/layout.tsx
Changed data-site-id value from "22" to "21" in external script tag

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Mixed complexity with new UI features (hostname input, step removal logic), backend filtering implementation across multiple query components, and localized styling adjustments. Changes follow consistent patterns but span multiple files with varying logic density.

Poem

🐰 Hostnames now guide each funnel's great flow,
Steps filter by domain, watch conversions grow!
Trash buttons stand ready, old paths to remove,
Our analytics journey has found its best groove! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch multi-hostname

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 151c541 and ae96d53.

📒 Files selected for processing (6)
  • client/src/api/analytics/funnels/useGetFunnel.ts (1 hunks)
  • client/src/app/[site]/funnels/components/FunnelForm.tsx (7 hunks)
  • client/src/app/layout.tsx (1 hunks)
  • client/src/components/ui/input-with-suggestions.tsx (1 hunks)
  • client/src/components/ui/label.tsx (1 hunks)
  • server/src/api/analytics/funnels/getFunnel.ts (4 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant