Skip to content

Commit

Permalink
Adding a posthog capture event when a proxy is created
Browse files Browse the repository at this point in the history
  • Loading branch information
surbhi-posthog committed Dec 2, 2024
1 parent b4d51e3 commit 82c7c2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/scenes/settings/environment/proxyLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { loaders } from 'kea-loaders'
import api from 'lib/api'
import { lemonToast } from 'lib/lemon-ui/LemonToast/LemonToast'
import { isDomain } from 'lib/utils'
import posthog from 'posthog-js'
import { organizationLogic } from 'scenes/organizationLogic'

import type { proxyLogicType } from './proxyLogicType'
Expand Down Expand Up @@ -68,7 +69,10 @@ export const proxyLogic = kea<proxyLogicType>([
listeners(({ actions, values }) => ({
collapseForm: () => actions.loadRecords(),
deleteRecordFailure: () => actions.loadRecords(),
createRecordSuccess: () => actions.loadRecords(),
createRecordSuccess: () => {
actions.loadRecords()
posthog.capture('proxy_record_created')
},
maybeRefreshRecords: () => {
if (values.shouldRefreshRecords) {
actions.loadRecords()
Expand Down

0 comments on commit 82c7c2b

Please sign in to comment.