Skip to content

feat: Add UTM parameter as an additional filter option for bookings#28759

Closed
deepshekhardas wants to merge 1 commit into
calcom:mainfrom
deepshekhardas:fix/utm-filter-28717
Closed

feat: Add UTM parameter as an additional filter option for bookings#28759
deepshekhardas wants to merge 1 commit into
calcom:mainfrom
deepshekhardas:fix/utm-filter-28717

Conversation

@deepshekhardas
Copy link
Copy Markdown

Fixes #28717

Summary

Adds UTM parameter filters to the bookings data table, allowing users to filter bookings by UTM source, medium, campaign, term, and content.

Changes

  • Added 5 UTM filter columns to filterColumns.ts:
    • utmSource
    • utmMedium
    • utmCampaign
    • utmTerm
    • utmContent
  • All filters use TEXT filter type with contains operator
  • Filters are hidden from the UI (filter-only functionality)

Benefits

  • Marketing teams can track which campaigns drive bookings
  • Allows filtering bookings by traffic source in the admin panel
  • Useful for analytics and attribution

Testing

  • Test filtering by UTM source
  • Test filtering by UTM medium
  • Test combined UTM filters

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/web/modules/bookings/columns/filterColumns.ts">

<violation number="1" location="apps/web/modules/bookings/columns/filterColumns.ts:27">
P2: New UTM filters are added to column metadata but not wired into filter extraction/query input, so selecting them will not actually filter booking results.</violation>

<violation number="2" location="apps/web/modules/bookings/columns/filterColumns.ts:138">
P2: New UTM translation keys are used in filter headers but are missing from locale files, risking raw key text in the UI.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

}),
columnHelper.accessor((row) => (row.type === "data" ? row.booking.utmSource : null), {
id: "utmSource",
header: t("utm_source"),
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: New UTM translation keys are used in filter headers but are missing from locale files, risking raw key text in the UI.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/bookings/columns/filterColumns.ts, line 138:

<comment>New UTM translation keys are used in filter headers but are missing from locale files, risking raw key text in the UI.</comment>

<file context>
@@ -128,5 +133,64 @@ export function buildFilterColumns({ t, permissions, status }: BuildFilterColumn
     }),
+    columnHelper.accessor((row) => (row.type === "data" ? row.booking.utmSource : null), {
+      id: "utmSource",
+      header: t("utm_source"),
+      enableColumnFilter: true,
+      enableSorting: false,
</file context>
Fix with Cubic

"attendeeEmail",
"dateRange",
"bookingUid",
"utmSource",
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: New UTM filters are added to column metadata but not wired into filter extraction/query input, so selecting them will not actually filter booking results.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/web/modules/bookings/columns/filterColumns.ts, line 27:

<comment>New UTM filters are added to column metadata but not wired into filter extraction/query input, so selecting them will not actually filter booking results.</comment>

<file context>
@@ -24,6 +24,11 @@ const FILTER_COLUMN_IDS = [
   "attendeeEmail",
   "dateRange",
   "bookingUid",
+  "utmSource",
+  "utmMedium",
+  "utmCampaign",
</file context>
Fix with Cubic

@romitg2 romitg2 closed this Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants