The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
fix events table
Steven Tey68f32c71dd02
diff --git a/apps/web/ui/analytics/events/events-table.tsx b/apps/web/ui/analytics/events/events-table.tsxindex 2f1edc4e06..00174accef 100644--- a/apps/web/ui/analytics/events/events-table.tsx+++ b/apps/web/ui/analytics/events/events-table.tsx@@ -121,6 +121,35 @@ export default function EventsTable({</span>) || <span className="text-gray-400">-</span>,},+ {+ id: "link",+ header: "Link",+ accessorKey: "link",+ minSize: 250,+ maxSize: 200,+ meta: {+ filterParams: ({ getValue }) => ({+ domain: getValue().domain,+ key: getValue().key,+ }),+ },+ cell: ({ getValue }) => (+ <div className="flex items-center gap-3">+ <LinkLogo+ apexDomain={getApexDomain(getValue().url)}+ className="size-4 shrink-0 sm:size-4"+ />+ <CopyText+ value={getValue().shortLink}+ successMessage="Copied link to clipboard!"+ >+ <span className="truncate" title={getValue().shortLink}>+ {getPrettyUrl(getValue().shortLink)}+ </span>+ </CopyText>+ </div>+ ),+ },{id: "customer",header: "Customer",@@ -389,6 +418,19 @@ export default function EventsTable({</div>),},+ // Sale invoice ID+ {+ id: "invoiceId",+ header: "Invoice ID",+ accessorKey: "sale.invoiceId",+ maxSize: 200,+ cell: ({ getValue }) =>+ (+ <span className="truncate" title={getValue()}>+ {getValue()}+ </span>+ ) || <span className="text-gray-400">-</span>,+ },// Date{id: "timestamp",diff --git a/apps/web/ui/analytics/events/use-column-visibility.ts b/apps/web/ui/analytics/events/use-column-visibility.tsindex 4b5e3a1515..45b1afd868 100644--- a/apps/web/ui/analytics/events/use-column-visibility.ts+++ b/apps/web/ui/analytics/events/use-column-visibility.ts@@ -6,6 +6,7 @@ export const eventColumns = {clicks: {all: ["trigger",+ "link","country","city","region",@@ -18,11 +19,12 @@ export const eventColumns = {"ip","timestamp",],- defaultVisible: ["trigger", "country", "device", "timestamp"],+ defaultVisible: ["trigger", "link", "country", "device", "timestamp"],},leads: {all: ["event",+ "link","customer","country","city",@@ -36,12 +38,21 @@ export const eventColumns = {"ip","timestamp",],- defaultVisible: ["event", "customer", "country", "device", "timestamp"],+ defaultVisible: [+ "event",+ "link",+ "customer",+ "country",+ "device",+ "timestamp",+ ],},sales: {all: ["event","customer",+ "link",+ "invoiceId","country","city","region",@@ -55,7 +66,14 @@ export const eventColumns = {"timestamp","saleAmount",],- defaultVisible: ["event", "customer", "country", "saleAmount", "timestamp"],+ defaultVisible: [+ "event",+ "link",+ "customer",+ "country",+ "saleAmount",+ "timestamp",+ ],},};@@ -69,7 +87,7 @@ const getDefaultColumnVisibility = (tab: EventType) => {export function useColumnVisibility() {const [columnVisibility, setColumnVisibility] = useLocalStorage<Record<EventType, VisibilityState>- >("events-columns", {+ >("events-table-columns", {clicks: getDefaultColumnVisibility("clicks"),leads: getDefaultColumnVisibility("leads"),sales: getDefaultColumnVisibility("sales"),