Skip to content

Commit

Permalink
fix referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink committed Dec 14, 2024
1 parent e28ade4 commit a69f87c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helpers/telemetry/telemetry.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let mixpanel: Mixpanel.Mixpanel | null = null

export function getTelemetryServer(baseData: TelemetryDataServer) {
if (process.env.MIXPANEL_ID && !mixpanel) {
mixpanel = Mixpanel.init(process.env.MIXPANEL_ID)
mixpanel = Mixpanel.init(process.env.NEXT_PUBLIC_MIXPANEL_ID)
}

return {
Expand Down
3 changes: 2 additions & 1 deletion hooks/useTelemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function useTelemetry() {
network: cfg.network,
type: 'UI',
fclVersion: cfg.appVersion,
parent: window?.parent?.location?.href,
parent:
window.location != window.parent.location ? document.referrer : undefined,
})
}

0 comments on commit a69f87c

Please sign in to comment.