diff --git a/components/gitpod-protocol/src/util/analytics.ts b/components/gitpod-protocol/src/util/analytics.ts index d44a909aebfd61..3725c124d646e2 100644 --- a/components/gitpod-protocol/src/util/analytics.ts +++ b/components/gitpod-protocol/src/util/analytics.ts @@ -30,7 +30,13 @@ class SegmentAnalyticsWriter implements IAnalyticsWriter { identify(msg: IdentifyMessage) { try { - this.analytics.identify(msg, (err: Error) => { + this.analytics.identify({ + ...msg, + integrations: { + "All": true, + "Mixpanel": !!msg.userId + } + }, (err: Error) => { if (err) { log.warn("analytics.identify failed", err); } @@ -42,7 +48,13 @@ class SegmentAnalyticsWriter implements IAnalyticsWriter { track(msg: TrackMessage) { try { - this.analytics.track(msg, (err: Error) => { + this.analytics.track({ + ...msg, + integrations: { + "All": true, + "Mixpanel": !!msg.userId + } + }, (err: Error) => { if (err) { log.warn("analytics.track failed", err); } @@ -54,7 +66,13 @@ class SegmentAnalyticsWriter implements IAnalyticsWriter { page(msg: PageMessage) { try{ - this.analytics.page(msg, (err: Error) => { + this.analytics.page({ + ...msg, + integrations: { + "All": true, + "Mixpanel": !!msg.userId + } + }, (err: Error) => { if (err) { log.warn("analytics.page failed", err); } diff --git a/components/server/src/analytics.ts b/components/server/src/analytics.ts index 19ba5c04b18b89..3c7e2d11a50b59 100644 --- a/components/server/src/analytics.ts +++ b/components/server/src/analytics.ts @@ -33,6 +33,7 @@ export async function trackSignup(user: User, request: Request, analytics: IAnal event: "signup", properties: { "auth_provider": user.identities[0].authProviderId, + "qualified": !!request.cookies["gitpod-marketing-website-visited"] } }); }