Skip to content

Commit

Permalink
fix(posthog): Stop tracking user session in signup flow
Browse files Browse the repository at this point in the history
  • Loading branch information
BreadGenie committed Jan 23, 2025
1 parent d7a2d72 commit 5e6278a
Show file tree
Hide file tree
Showing 6 changed files with 204 additions and 280 deletions.
54 changes: 20 additions & 34 deletions dashboard/src2/components/Onboarding.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<div
class="w-1/2 cursor-pointer rounded-sm py-1.5 text-center transition-all"
:class="{
'bg-gray-100': isAutomatedBilling
'bg-gray-100': isAutomatedBilling,
}"
@click="isAutomatedBilling = true"
>
Expand All @@ -154,7 +154,7 @@
<div
class="w-1/2 cursor-pointer rounded-sm py-1.5 text-center transition-all"
:class="{
'bg-gray-100': !isAutomatedBilling
'bg-gray-100': !isAutomatedBilling,
}"
@click="isAutomatedBilling = false"
>
Expand Down Expand Up @@ -243,46 +243,32 @@ import TextInsideCircle from './TextInsideCircle.vue';
export default {
name: 'Onboarding',
components: {
StripeCard2: defineAsyncComponent(() =>
import('../components/StripeCard.vue')
StripeCard2: defineAsyncComponent(
() => import('../components/StripeCard.vue'),
),
UpdateBillingDetailsForm: defineAsyncComponent(() =>
import('./UpdateBillingDetailsForm.vue')
UpdateBillingDetailsForm: defineAsyncComponent(
() => import('./UpdateBillingDetailsForm.vue'),
),
CardWithDetails: defineAsyncComponent(() =>
import('../../src/components/CardWithDetails.vue')
CardWithDetails: defineAsyncComponent(
() => import('../../src/components/CardWithDetails.vue'),
),
BuyPrepaidCreditsForm: defineAsyncComponent(() =>
import('./BuyPrepaidCreditsForm.vue')
BuyPrepaidCreditsForm: defineAsyncComponent(
() => import('./BuyPrepaidCreditsForm.vue'),
),
OnboardingAppSelector: defineAsyncComponent(() =>
import('./OnboardingAppSelector.vue')
OnboardingAppSelector: defineAsyncComponent(
() => import('./OnboardingAppSelector.vue'),
),
AlertBanner: defineAsyncComponent(() => import('./AlertBanner.vue')),
TextInsideCircle
},
mounted() {
if (window.posthog?.__loaded) {
window.posthog.identify(this.$team.doc.user, {
app: 'frappe_cloud',
action: 'onboarding'
});
window.posthog.startSessionRecording();
}
},
unmounted() {
if (window.posthog?.__loaded && window.posthog.sessionRecordingStarted()) {
window.posthog.stopSessionRecording();
}
TextInsideCircle,
},
data() {
return {
billingInformation: {
cardHolderName: '',
country: '',
gstin: ''
gstin: '',
},
isAutomatedBilling: true
isAutomatedBilling: true,
};
},
methods: {
Expand All @@ -294,7 +280,7 @@ export default {
},
onBillingAddresUpdateSuccess() {
this.$team.reload();
}
},
},
computed: {
isBillingDetailsSet() {
Expand All @@ -308,15 +294,15 @@ export default {
},
trialSite() {
return this.$team.doc.trial_sites?.[0];
}
},
},
resources: {
availableApps() {
return {
url: 'press.api.marketplace.get_marketplace_apps_for_onboarding',
auto: true
auto: true,
};
}
}
},
},
};
</script>
17 changes: 4 additions & 13 deletions dashboard/src2/components/OnboardingWithoutPayment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,15 @@ import OnboardingAppSelector from './OnboardingAppSelector.vue';
export default {
name: 'Onboarding',
components: {
OnboardingAppSelector
},
mounted() {
if (window.posthog?.__loaded) {
window.posthog.identify(this.$team.doc.user, {
app: 'frappe_cloud',
action: 'onboarding'
});
window.posthog.startSessionRecording();
}
OnboardingAppSelector,
},
resources: {
availableApps() {
return {
url: 'press.api.marketplace.get_marketplace_apps_for_onboarding',
auto: true
auto: true,
};
}
}
},
},
};
</script>
Loading

0 comments on commit 5e6278a

Please sign in to comment.