|
1 | 1 | <script lang="ts">
|
| 2 | + import { trackEvent } from '$lib/actions/analytics'; |
2 | 3 | import Noise from '$lib/components/fancy/noise.svelte';
|
3 | 4 | import { Button } from '$lib/components/ui';
|
4 | 5 | import { classNames } from '$lib/utils/classnames';
|
|
10 | 11 | description: string;
|
11 | 12 | tag?: string;
|
12 | 13 | subtitle?: string;
|
| 14 | + event: string; |
13 | 15 | }> = [
|
14 | 16 | {
|
15 | 17 | name: 'Free',
|
16 | 18 | price: '$0',
|
17 |
| - description: 'For personal hobby projects and students.' |
| 19 | + description: 'For personal hobby projects and students.', |
| 20 | + event: 'home-pricing-cards-free-click' |
18 | 21 | },
|
19 | 22 | {
|
20 | 23 | name: 'Pro',
|
21 | 24 | price: '$15',
|
22 | 25 | tag: 'Popular',
|
23 | 26 | description: 'For pro developers and teams that need to scale their products.',
|
24 |
| - subtitle: 'per member/month' |
| 27 | + subtitle: 'per member/month', |
| 28 | + event: 'home-pricing-cards-pro-click' |
25 | 29 | },
|
26 | 30 | {
|
27 | 31 | name: 'Scale',
|
28 | 32 | price: '$599',
|
29 | 33 | description: 'For teams and products that need more control and support.',
|
30 |
| - subtitle: 'per organization/month' |
| 34 | + subtitle: 'per organization/month', |
| 35 | + event: 'home-pricing-cards-scale-click' |
31 | 36 | },
|
32 | 37 | {
|
33 | 38 | name: 'Enterprise',
|
34 | 39 | price: 'Custom',
|
35 | 40 | description: 'For enterprises that need more power and premium support.',
|
36 |
| - subtitle: 'per organization/month' |
| 41 | + subtitle: 'per organization/month', |
| 42 | + event: 'home-pricing-cards-enterprise-click' |
37 | 43 | }
|
38 | 44 | ];
|
39 | 45 | </script>
|
|
58 | 64 | </h2>
|
59 | 65 |
|
60 | 66 | <div class="mt-4 flex flex-col gap-2 lg:flex-row">
|
61 |
| - <Button href={getAppwriteDashboardUrl()} class="w-full! md:w-fit!" |
62 |
| - >Start building for free</Button |
| 67 | + <Button |
| 68 | + href={getAppwriteDashboardUrl()} |
| 69 | + class="w-full! md:w-fit!" |
| 70 | + onclick={() => { |
| 71 | + trackEvent(`pricing-get-started-click`); |
| 72 | + }}>Start building for free</Button |
63 | 73 | >
|
64 |
| - <Button href="/pricing" class="w-full! md:w-fit!" variant="secondary" |
65 |
| - >View pricing plans</Button |
| 74 | + <Button |
| 75 | + onclick={() => { |
| 76 | + trackEvent(`pricing-view-plans-click`); |
| 77 | + }} |
| 78 | + href="/pricing" |
| 79 | + class="w-full! md:w-fit!" |
| 80 | + variant="secondary">View pricing plans</Button |
66 | 81 | >
|
67 | 82 | </div>
|
68 | 83 | </div>
|
69 | 84 |
|
70 | 85 | <div
|
71 | 86 | class="border-smooth divide-smooth grid min-h-75 w-full grid-cols-1 divide-y divide-dashed rounded-3xl border bg-white/2 backdrop-blur-lg md:grid-cols-2 md:gap-y-12 md:divide-y-0 md:px-4 md:py-8 lg:grid-cols-4 lg:divide-x"
|
72 | 87 | >
|
73 |
| - {#each plans as { name, price, tag: label, subtitle, description }} |
| 88 | + {#each plans as { name, price, tag: label, subtitle, description, event }} |
74 | 89 | {@const isEnterprise = name === 'Enterprise'}
|
75 | 90 | <div class="flex h-full w-full grow flex-col gap-1 px-5 py-5 md:pb-0">
|
76 | 91 | <div class="flex items-center gap-2.5">
|
|
96 | 111 | class="mt-8 mb-0 w-full!"
|
97 | 112 | variant={name === 'Pro' ? 'primary' : 'secondary'}
|
98 | 113 | href={isEnterprise ? '/contact-us/enterprise' : getAppwriteDashboardUrl()}
|
99 |
| - >{isEnterprise ? 'Contact us' : 'Start building'}</Button |
| 114 | + onclick={() => { |
| 115 | + trackEvent(event); |
| 116 | + }}>{isEnterprise ? 'Contact us' : 'Start building'}</Button |
100 | 117 | >
|
101 | 118 | </div>
|
102 | 119 | {/each}
|
|
0 commit comments