1
0
Fork 0
mirror of synced 2024-06-18 18:35:37 +12:00

Merge pull request #13338 from Budibase/feature/nps-posthog

Feature/nps posthog
This commit is contained in:
Martin McKeaveney 2024-03-25 10:01:56 +00:00 committed by GitHub
commit 6bd6ee779b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View file

@ -107,3 +107,4 @@ budibase-component
budibase-datasource
*.iml
.nx

View file

@ -32,10 +32,14 @@
import TourWrap from "components/portal/onboarding/TourWrap.svelte"
import { TOUR_STEP_KEYS } from "components/portal/onboarding/tours.js"
import { goto } from "@roxi/routify"
import { onMount } from "svelte"
import PosthogClient from "../../analytics/PosthogClient"
export let application
export let loaded
const posthog = new PosthogClient(process.env.POSTHOG_TOKEN)
let unpublishModal
let updateAppModal
let revertModal
@ -44,6 +48,7 @@
let appActionPopoverOpen = false
let appActionPopoverAnchor
let publishing = false
let showNpsSurvey = false
let lastOpened
$: filteredApps = $appsStore.apps.filter(app => app.devId === application)
@ -98,6 +103,7 @@
type: "success",
icon: "GlobeCheck",
})
showNpsSurvey = true
await completePublish()
} catch (error) {
console.error(error)
@ -148,6 +154,10 @@
notifications.error("Error refreshing app")
}
}
onMount(() => {
posthog.init()
})
</script>
<!-- svelte-ignore a11y-click-events-have-key-events -->
@ -345,6 +355,10 @@
<RevertModal bind:this={revertModal} />
<VersionModal hideIcon bind:this={versionModal} />
{#if showNpsSurvey}
<div class="nps-survey" />
{/if}
<style>
.app-action-popover-content {
padding: var(--spacing-xl);