mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
chore: add missing events
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
import { ContainerButton } from '.';
|
||||
import { Button } from '$lib/elements/forms';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let isFlex = true;
|
||||
export let title: string;
|
||||
@@ -92,8 +93,12 @@
|
||||
<span class="text">
|
||||
You've reached the {services} limit for the {tier} plan. <Button
|
||||
link
|
||||
on:click={upgradeMethod}>Upgrade</Button> your organization for additional
|
||||
resources.
|
||||
on:click={upgradeMethod}
|
||||
on:click={() =>
|
||||
trackEvent('click_organization_upgrade', {
|
||||
from: 'button',
|
||||
source: 'inline_alert'
|
||||
})}>Upgrade</Button> your organization for additional resources.
|
||||
</span>
|
||||
</Alert>
|
||||
{/if}
|
||||
@@ -124,7 +129,12 @@
|
||||
{title.toLocaleLowerCase()} per project on the {tier} plan.
|
||||
{#if $organization?.billingPlan === BillingPlan.STARTER}<Button
|
||||
link
|
||||
on:click={upgradeMethod}>Upgrade</Button>
|
||||
on:click={upgradeMethod}
|
||||
on:click={() =>
|
||||
trackEvent('click_organization_upgrade', {
|
||||
from: 'button',
|
||||
source: 'resource_limit_tag'
|
||||
})}>Upgrade</Button>
|
||||
for addtional {title.toLocaleLowerCase()}.
|
||||
{/if}
|
||||
</p>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
import { accumulateFromEndingTotal, total } from '$lib/layout/usage.svelte';
|
||||
import type { OrganizationUsage } from '$lib/sdk/billing';
|
||||
import { BillingPlan } from '$lib/constants';
|
||||
import { trackEvent } from '$lib/actions/analytics';
|
||||
|
||||
export let data;
|
||||
|
||||
@@ -42,7 +43,14 @@
|
||||
<Heading tag="h2" size="5">Usage</Heading>
|
||||
|
||||
{#if $organization?.billingPlan === BillingPlan.STARTER}
|
||||
<Button on:click={() => wizard.start(ChangeOrganizationTierCloud)}>
|
||||
<Button
|
||||
on:click={() => {
|
||||
wizard.start(ChangeOrganizationTierCloud);
|
||||
trackEvent('click_organization_upgrade', {
|
||||
from: 'button',
|
||||
source: 'organization_usage'
|
||||
});
|
||||
}}>
|
||||
<span class="text">Upgrade</span>
|
||||
</Button>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user