The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
settings/analytics → settings/tracking
Steven Tey4809ba682612
diff --git a/apps/web/app/(ee)/api/track/click/route.ts b/apps/web/app/(ee)/api/track/click/route.tsindex 466dcde5ea..e71a8f9b1d 100644--- a/apps/web/app/(ee)/api/track/click/route.ts+++ b/apps/web/app/(ee)/api/track/click/route.ts@@ -135,7 +135,7 @@ export const POST = withAxiom(async (req) => {if (!allowRequest) {throw new DubApiError({code: "forbidden",- message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/analytics`,+ message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/tracking`,});}diff --git a/apps/web/app/(ee)/api/track/lead/client/route.ts b/apps/web/app/(ee)/api/track/lead/client/route.tsindex 03ad1093c6..c22810fcb1 100644--- a/apps/web/app/(ee)/api/track/lead/client/route.ts+++ b/apps/web/app/(ee)/api/track/lead/client/route.ts@@ -23,7 +23,7 @@ export const POST = withPublishableKey(if (!allowRequest) {throw new DubApiError({code: "forbidden",- message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/analytics`,+ message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/tracking`,});}diff --git a/apps/web/app/(ee)/api/track/sale/client/route.ts b/apps/web/app/(ee)/api/track/sale/client/route.tsindex 82f0ea0c84..1cdcd82316 100644--- a/apps/web/app/(ee)/api/track/sale/client/route.ts+++ b/apps/web/app/(ee)/api/track/sale/client/route.ts@@ -23,7 +23,7 @@ export const POST = withPublishableKey(if (!allowRequest) {throw new DubApiError({code: "forbidden",- message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/analytics`,+ message: `Request origin '${getHostnameFromRequest(req)}' is not included in the allowed hostnames for this workspace. Update your allowed hostnames here: https://app.dub.co/settings/tracking`,});}diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/page-client.tsxindex d25dd7bc34..16cedbe058 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/page-client.tsx@@ -150,7 +150,7 @@ function FinishSetupWrapper({attribute sales, and measure partner performance.</p><Link- href={`/${slug}/settings/analytics`}+ href={`/${slug}/settings/tracking`}className={cn(buttonVariants({ variant: "primary" }),"mt-6 flex h-9 items-center justify-center whitespace-nowrap rounded-lg border px-3 text-sm",diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/add-hostname-modal.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/add-hostname-modal.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/add-hostname-modal.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/add-hostname-modal.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/base-script-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/base-script-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/base-script-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/base-script-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/complete-step-button.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/complete-step-button.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/complete-step-button.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/complete-step-button.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/connection-instructions.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/connection-instructions.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/connection-instructions.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/connection-instructions.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/conversion-tracking-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/conversion-tracking-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-toggle.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/conversion-tracking-toggle.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/conversion-tracking-toggle.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/conversion-tracking-toggle.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/guide.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/guide.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/guide.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/guide.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-menu.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/hostname-menu.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-menu.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/hostname-menu.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/hostname-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/hostname-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/hostname-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/outbound-domain-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/outbound-domain-tracking-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/outbound-domain-tracking-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/outbound-domain-tracking-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page-client.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page-client.tsxsimilarity index 98%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page-client.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page-client.tsxindex 0905976de4..553db96dae 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page-client.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page-client.tsx@@ -141,7 +141,7 @@ const SaleEventsStep = ({);};-export default function WorkspaceAnalyticsPageClient() {+export function WorkspaceTrackingSettingsPageClient() {const { searchParams, queryParams } = useRouterStuff();const expandedStep = (searchParams.get("step") as StepType) || "connect";diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page.tsxsimilarity index 56%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page.tsxindex 01f14d57c8..e0673e6909 100644--- a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/page.tsx+++ b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/page.tsx@@ -2,22 +2,22 @@ import { PageContent } from "@/ui/layout/page-content";import { PageWidthWrapper } from "@/ui/layout/page-width-wrapper";import { Suspense } from "react";import { ConversionTrackingToggle } from "./conversion-tracking-toggle";-import WorkspaceAnalyticsPageClient from "./page-client";+import { WorkspaceTrackingSettingsPageClient } from "./page-client";-export default function WorkspaceAnalyticsPage() {+export default function WorkspaceTrackingSettingsPage() {return (<PageContent- title="Analytics"+ title="Tracking"titleInfo={{title:- "Configure analytics and conversion tracking settings for your workspace.",- href: "https://dub.co/docs/conversions/quickstart",+ "Configure and install Dub's tracking scripts and start tracking conversions on your website and web applications.",+ href: "https://dub.co/docs/concepts/attribution",}}controls={<ConversionTrackingToggle />}><PageWidthWrapper className="max-w-[800px] pb-20"><Suspense>- <WorkspaceAnalyticsPageClient />+ <WorkspaceTrackingSettingsPageClient /></Suspense></PageWidthWrapper></PageContent>diff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-form.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-form.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-form.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-form.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-menu.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-menu.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/publishable-key-menu.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/publishable-key-menu.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/site-visit-tracking-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/site-visit-tracking-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/site-visit-tracking-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/site-visit-tracking-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/step.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/step.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/step.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/step.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-lead-guides-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/track-lead-guides-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-lead-guides-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/track-lead-guides-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-sales-guides-section.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/track-sales-guides-section.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/track-sales-guides-section.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/track-sales-guides-section.tsxdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-dynamic-guide.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/use-dynamic-guide.tssimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-dynamic-guide.tsrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/use-dynamic-guide.tsdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-selected-guide.ts b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/use-selected-guide.tssimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/use-selected-guide.tsrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/use-selected-guide.tsdiff --git a/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/verify-install.tsx b/apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsxsimilarity index 100%rename from apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/analytics/verify-install.tsxrename to apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/settings/tracking/verify-install.tsxdiff --git a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/success/page-client.tsx b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/success/page-client.tsxindex 95a2d7734c..ec185d9940 100644--- a/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/success/page-client.tsx+++ b/apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/success/page-client.tsx@@ -127,7 +127,7 @@ export function SuccessPageClient({icon: Plug2,title: "Set up conversion tracking",description: "Install the Dub tracking script",- href: `/${workspace.slug}/settings/analytics`,+ href: `/${workspace.slug}/settings/tracking`,cta: "Install",loading: isLoadingWorkspace,complete: connectedAnalytics,diff --git a/apps/web/lib/middleware/utils/app-redirect.ts b/apps/web/lib/middleware/utils/app-redirect.tsindex eeabd4c24a..9a579086a3 100644--- a/apps/web/lib/middleware/utils/app-redirect.ts+++ b/apps/web/lib/middleware/utils/app-redirect.ts@@ -41,10 +41,10 @@ export const appRedirect = async (path: string) => {if (upgradeRegex.test(path))return path.replace(upgradeRegex, "/$1/settings/billing/upgrade");- // Redirect "/[slug]/guides" and all child paths to "/[slug]/settings/analytics"+ // Redirect "/[slug]/guides" and all child paths to "/[slug]/settings/tracking"const guidesRegex = /^\/([^\/]+)\/guides(?:\/(.*))?$/;if (guidesRegex.test(path))- return path.replace(guidesRegex, "/$1/settings/analytics");+ return path.replace(guidesRegex, "/$1/settings/tracking");// Redirect "/[slug]/settings/library/:path*" to "/[slug]/links/:path*"const libraryRegex = /^\/([^\/]+)\/settings\/library\/(.*)$/;@@ -56,6 +56,11 @@ export const appRedirect = async (path: string) => {if (peopleRegex.test(path))return path.replace(peopleRegex, "/$1/settings/members");+ // Redirect "/[slug]/settings/analytics" to "/[slug]/settings/tracking"+ const settingsAnalyticsRegex = /^\/([^\/]+)\/settings\/analytics$/;+ if (settingsAnalyticsRegex.test(path))+ return path.replace(settingsAnalyticsRegex, "/$1/settings/tracking");+// Redirect "/[slug]/programs/prog_[id]/:path*" to "/[slug]/program/:path*"const oldProgramPagesRegex = /^\/([^\/]+)\/programs\/prog_[^\/]+\/(.*)$/;if (oldProgramPagesRegex.test(path))diff --git a/apps/web/scripts/find-link.ts b/apps/web/scripts/find-link.tsindex 1f0e46b230..67918b3a22 100644--- a/apps/web/scripts/find-link.ts+++ b/apps/web/scripts/find-link.ts@@ -1,20 +1,174 @@import { prisma } from "@dub/prisma";+import { currencyFormatter } from "@dub/utils";import "dotenv-flow/config";+const PROGRAM_ID = "prog_1K0A6SX71Q3ZRC1HYFMXQGWJ8";++// Table data: Invoice ID -> expected commission amount (USD cents)+const EXPECTED_COMMISSION_BY_INVOICE_ID: Record<string, number> = {+ "508542": 11880, // $118.80+ "506161": 2346, // $23.46+ "508363": 1100, // $11.00+ "508294": 106, // $1.06+ "507722": 936, // $9.36+ "507692": 6000, // $60.00+ "507596": 16200, // $162.00+ "507579": 6565, // $65.65+ "507452": 180, // $1.80+ "507444": 870, // $8.70+ "507254": 540, // $5.40+ "507236": 8280, // $82.80+ "507185": 3105, // $31.05+ "507180": 530, // $5.30+ "506974": 463, // $4.63+ "506925": 180, // $1.80+ "506853": 195, // $1.95+ "506814": 1080, // $10.80+ "506715": 7615, // $76.15+ "506694": 31680, // $316.80+ "506601": 2760, // $27.60+ "506570": 412, // $4.12+ "506539": 463, // $4.63+ "506377": 1080, // $10.80+ "506367": 2070, // $20.70+ "506348": 23760, // $237.60+ "506235": 360, // $3.60+ "506208": 435, // $4.35+ "506197": 6030, // $60.30+ "506072": 2760, // $27.60+ "506036": 14683, // $146.83+ "506021": 11880, // $118.80+ "505685": 4508, // $45.08+ "505634": 3240, // $32.40+ "505609": 1927, // $19.27+ "505401": 900, // $9.00+ "505215": 10560, // $105.60+ "504939": 32400, // $324.00+ "504837": 79380, // $793.80+ "504640": 3304, // $33.04+ "504627": 435, // $4.35+ "504621": 49725, // $497.25+ "504510": 2760, // $27.60+ "504508": 1080, // $10.80+ "504415": 295, // $2.95+ "504412": 7080, // $70.80+ "504375": 5175, // $51.75+ "504182": 1035, // $10.35+ "503995": 5520, // $55.20+ "503994": 14160, // $141.60+ "503972": 435, // $4.35+ "503922": 255, // $2.55+ "503799": 5443, // $54.43+ "503762": 2199, // $21.99+ "503691": 3240, // $32.40+ "503518": 1035, // $10.35+ "503188": 2937, // $29.37+ "502940": 21812, // $218.12+ "502810": 2070, // $20.70+ "502726": 4595, // $45.95+ "502330": 1080, // $10.80+};++const INVOICE_IDS = Object.keys(EXPECTED_COMMISSION_BY_INVOICE_ID);+async function main() {- const links = await prisma.link.findMany({+ const commissions = await prisma.commission.findMany({where: {- projectId: "xxx",- url: "https://example.com",+ programId: PROGRAM_ID,+ invoiceId: { in: INVOICE_IDS },},select: {id: true,- shortLink: true,- url: true,+ invoiceId: true,+ amount: true,+ earnings: true,+ type: true,+ status: true,+ createdAt: true,},+ orderBy: { createdAt: "desc" },});- console.table(links);+ console.log(+ `Expected commissions from table: ${INVOICE_IDS.length} invoice(s)\n`,+ );+ console.log(+ `Found ${commissions.length} commission(s) in DB for program ${PROGRAM_ID} (filtered by invoiceId)\n`,+ );++ const mismatches: Array<{+ id: string;+ invoiceId: string | null;+ earnings: number;+ expectedCents: number;+ diff: number;+ }> = [];++ const matchedInvoiceIds = new Set<string>();++ for (const c of commissions) {+ if (!c.invoiceId) continue;+ const expectedCents = EXPECTED_COMMISSION_BY_INVOICE_ID[c.invoiceId];+ if (expectedCents === undefined) continue;++ matchedInvoiceIds.add(c.invoiceId);++ if (c.earnings !== expectedCents) {+ mismatches.push({+ id: c.id,+ invoiceId: c.invoiceId,+ earnings: c.earnings,+ expectedCents,+ diff: c.earnings - expectedCents,+ });+ }+ }++ const missingInDb = INVOICE_IDS.filter((id) => !matchedInvoiceIds.has(id));++ if (mismatches.length > 0) {+ console.log("Mismatches (DB earnings ≠ table commission amount):");+ console.table(+ mismatches.map((m) => ({+ id: m.id,+ invoiceId: m.invoiceId,+ earnings: currencyFormatter(m.earnings),+ expected: currencyFormatter(m.expectedCents),+ diff: currencyFormatter(m.diff),+ })),+ );+ console.log(`\nTotal mismatches: ${mismatches.length}`);+ } else {+ console.log(+ "All commissions match the table (earnings = expected commission amount).",+ );+ }++ if (missingInDb.length > 0) {+ console.log("\nInvoice IDs in table but not found in DB:");+ console.log(missingInDb.join(", "));+ console.log(`Count: ${missingInDb.length}`);+ }++ console.log("\nAll filtered commissions:");+ console.table(+ commissions.map((c) => ({+ id: c.id,+ invoiceId: c.invoiceId,+ amount: currencyFormatter(c.amount),+ earnings: currencyFormatter(c.earnings),+ expected: c.invoiceId+ ? currencyFormatter(EXPECTED_COMMISSION_BY_INVOICE_ID[c.invoiceId] ?? 0)+ : "-",+ match: c.invoiceId+ ? c.earnings === (EXPECTED_COMMISSION_BY_INVOICE_ID[c.invoiceId] ?? -1)+ ? "✓"+ : "✗"+ : "-",+ status: c.status,+ createdAt: c.createdAt.toISOString().slice(0, 10),+ })),+ );}main();diff --git a/apps/web/tests/tracks/track-click.test.ts b/apps/web/tests/tracks/track-click.test.tsindex 5f7a4f6a85..cd376cd279 100644--- a/apps/web/tests/tracks/track-click.test.ts+++ b/apps/web/tests/tracks/track-click.test.ts@@ -185,7 +185,7 @@ describe("POST /track/click", async () => {// expect(response.data).toStrictEqual({// error: {// code: "forbidden",- // message: `Request origin 'not-allowed.com' is not included in the allowed hostnames for this workspace (${E2E_LINK.domain}). Update your allowed hostnames here: https://app.dub.co/settings/analytics`,+ // message: `Request origin 'not-allowed.com' is not included in the allowed hostnames for this workspace (${E2E_LINK.domain}). Update your allowed hostnames here: https://app.dub.co/settings/tracking`,// doc_url: "https://dub.co/docs/api-reference/errors#forbidden",// },// });diff --git a/apps/web/ui/customers/customers-table/customers-table.tsx b/apps/web/ui/customers/customers-table/customers-table.tsxindex b45270ae33..9ee70f2dbf 100644--- a/apps/web/ui/customers/customers-table/customers-table.tsx+++ b/apps/web/ui/customers/customers-table/customers-table.tsx@@ -508,7 +508,7 @@ export function CustomersTable({: "No customers have been recorded for your workspace yet. Learn how to track your first customer."}{...(!isFiltered && {- learnMoreHref: `/${workspaceSlug}/settings/analytics`,+ learnMoreHref: `/${workspaceSlug}/settings/tracking`,learnMoreTarget: "_self",learnMoreText: "Read the guides",})}diff --git a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsxindex e8fa57de7a..772a299765 100644--- a/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx+++ b/apps/web/ui/layout/sidebar/app-sidebar-nav.tsx@@ -29,6 +29,7 @@ import {Key,LifeRing,LinesY as LinesYStatic,+ MarketingTarget,MoneyBills2,Msgs,PaperPlane,@@ -404,26 +405,26 @@ const NAV_AREAS: SidebarNavAreas<SidebarNavData> = {{name: "Developer",items: [- {- name: "Analytics",- icon: LinesY,- href: `/${slug}/settings/analytics`,- },{name: "API Keys",icon: Key,href: `/${slug}/settings/tokens`,},{- name: "OAuth Apps",- icon: CubeSettings,- href: `/${slug}/settings/oauth-apps`,+ name: "Tracking",+ icon: MarketingTarget,+ href: `/${slug}/settings/tracking`,},{name: "Webhooks",icon: Webhook,href: `/${slug}/settings/webhooks`,},+ {+ name: "OAuth Apps",+ icon: CubeSettings,+ href: `/${slug}/settings/oauth-apps`,+ },],},{diff --git a/apps/web/ui/layout/sidebar/dub-partners-popup.tsx b/apps/web/ui/layout/sidebar/dub-partners-popup.tsxindex 7c65241789..dbe4640c54 100644--- a/apps/web/ui/layout/sidebar/dub-partners-popup.tsx+++ b/apps/web/ui/layout/sidebar/dub-partners-popup.tsx@@ -138,7 +138,7 @@ function DubPartnersPopupInner({</p><div className="mt-4 grid w-full grid-cols-2 gap-2"><Link- href={`/${slug}/settings/analytics`}+ href={`/${slug}/settings/tracking`}className="flex h-7 items-center justify-center whitespace-nowrap rounded-md bg-white/10 px-2.5 text-xs text-white transition-colors duration-150 hover:bg-white/15">Quickstart guidesdiff --git a/apps/web/ui/layout/sidebar/sidebar-nav.tsx b/apps/web/ui/layout/sidebar/sidebar-nav.tsxindex abc1d6d4c3..8d17bf5b2f 100644--- a/apps/web/ui/layout/sidebar/sidebar-nav.tsx+++ b/apps/web/ui/layout/sidebar/sidebar-nav.tsx@@ -270,7 +270,7 @@ function SidebarAreasPanel<T extends Record<any, any>>({{data.showConversionGuides && (<div className="px-3 pb-2"><Link- href={`/${data.slug}/settings/analytics`}+ href={`/${data.slug}/settings/tracking`}className="flex items-center gap-2 rounded-lg bg-neutral-200/75 px-2.5 py-2 text-xs text-neutral-700 transition-colors hover:bg-neutral-200"><BookOpen className="size-4" />diff --git a/apps/web/ui/layout/toolbar/onboarding/onboarding-button.tsx b/apps/web/ui/layout/toolbar/onboarding/onboarding-button.tsxindex efadaa857d..b9e3caf118 100644--- a/apps/web/ui/layout/toolbar/onboarding/onboarding-button.tsx+++ b/apps/web/ui/layout/toolbar/onboarding/onboarding-button.tsx@@ -85,7 +85,7 @@ function OnboardingButtonInner({},{display: "Set up conversion tracking",- cta: `/${slug}/settings/analytics`,+ cta: `/${slug}/settings/tracking`,checked:connectedAnalytics || (customersCount && customersCount > 0),recommended: true,diff --git a/packages/email/src/templates/program-welcome.tsx b/packages/email/src/templates/program-welcome.tsxindex 84efdaf092..92cd5df24e 100644--- a/packages/email/src/templates/program-welcome.tsx+++ b/packages/email/src/templates/program-welcome.tsx@@ -128,7 +128,7 @@ export default function ProgramWelcome({3. <span className="font-medium">Set up conversion tracking</span>:{" "}<Link- href={`${workspaceUrlPrefix}/settings/analytics`}+ href={`${workspaceUrlPrefix}/settings/tracking`}className="font-semibold text-neutral-800 underline underline-offset-2">Follow our quickstart guidediff --git a/packages/email/src/templates/welcome-email.tsx b/packages/email/src/templates/welcome-email.tsxindex 911168a782..1d2d006179 100644--- a/packages/email/src/templates/welcome-email.tsx+++ b/packages/email/src/templates/welcome-email.tsx@@ -230,7 +230,7 @@ export default function WelcomeEmail({<Text className="mb-4 text-sm leading-6 text-neutral-600">2. Track conversions:{" "}<Link- href="https://app.dub.co/settings/analytics"+ href="https://app.dub.co/settings/tracking"className="text-neutral-600 underline underline-offset-2">Install the Dub tracking script