Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

📈 Track custom branding as a space group property (#2678)

Luke Vella8b0fe19f2a6d
diff --git a/apps/web/src/features/billing/webhook/mutations.ts b/apps/web/src/features/billing/webhook/mutations.ts
index bebf2c9ff..663086ff8 100644
--- a/apps/web/src/features/billing/webhook/mutations.ts
+++ b/apps/web/src/features/billing/webhook/mutations.ts
@@ -285,7 +285,7 @@ async function onCustomerSubscriptionCreated(event: Stripe.Event) {
groupType: "space",
groupKey: spaceId,
properties: {
- seatCount: quantity,
+ seat_count: quantity,
tier,
},
});
@@ -465,7 +465,7 @@ async function onCustomerSubscriptionUpdated(event: Stripe.Event) {
groupType: "space",
groupKey: spaceId,
properties: {
- seatCount: quantity,
+ seat_count: quantity,
tier,
},
});
diff --git a/apps/web/src/lib/auth.ts b/apps/web/src/lib/auth.ts
index 36f25c9f6..53ed7b6f6 100644
--- a/apps/web/src/lib/auth.ts
+++ b/apps/web/src/lib/auth.ts
@@ -476,8 +476,8 @@ export const authLib = betterAuth({
groupKey: space.id,
properties: {
name: space.name,
- memberCount: 1,
- seatCount: 1,
+ member_count: 1,
+ seat_count: 1,
tier: "hobby",
},
});
diff --git a/apps/web/src/trpc/routers/spaces.ts b/apps/web/src/trpc/routers/spaces.ts
index 5972db4d8..67ea2a4de 100644
--- a/apps/web/src/trpc/routers/spaces.ts
+++ b/apps/web/src/trpc/routers/spaces.ts
@@ -169,8 +169,8 @@ export const spaces = router({
groupKey: space.id,
properties: {
name: space.name,
- memberCount: 1,
- seatCount: 1,
+ member_count: 1,
+ seat_count: 1,
tier: "hobby",
},
});
@@ -300,6 +300,14 @@ export const spaces = router({
data: { showBranding: input.showBranding },
});
+ identifyGroup({
+ groupType: "space",
+ groupKey: ctx.space.id,
+ properties: {
+ custom_branding: input.showBranding,
+ },
+ });
+
track(ctx.user, {
event: "space_update_show_branding",
properties: {