Skip to content

Commit a31f099

Browse files
Merge pull request #189 from appwrite/fix-missing-events
fix: add missing events
2 parents 6d21ba1 + c9598d3 commit a31f099

File tree

14 files changed

+52
-0
lines changed

14 files changed

+52
-0
lines changed

src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/createDocument.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import { createDocument } from './wizard/store';
1313
import type { WizardStepsType } from '$lib/layout/wizard.svelte';
1414
import { Dependencies } from '$lib/constants';
15+
import { trackEvent } from '$lib/actions/analytics';
1516
1617
const databaseId = $page.params.database;
1718
const collectionId = $page.params.collection;
@@ -42,6 +43,7 @@
4243
message: 'Document has been created',
4344
type: 'success'
4445
});
46+
trackEvent('submit_document_create');
4547
invalidate(Dependencies.DOCUMENTS);
4648
wizard.hide();
4749
} catch (error) {

src/routes/console/project-[project]/databases/database-[database]/collection-[collection]/document-[document]/document.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import { Dependencies } from '$lib/constants';
1313
import { invalidate } from '$app/navigation';
1414
import Attribute from './attribute.svelte';
15+
import { trackEvent } from '$lib/actions/analytics';
1516
1617
let disableUpdate = true;
1718
let currentDoc: string;
@@ -61,6 +62,9 @@
6162
6263
currentDoc = JSON.stringify($work);
6364
invalidate(Dependencies.DOCUMENT);
65+
trackEvent('submit_document_update', {
66+
type: 'android'
67+
});
6468
disableUpdate = true;
6569
addNotification({
6670
message: 'Document was updated!',

src/routes/console/project-[project]/overview/keys/[key]/+page@project-[project].svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import { key } from './store';
1414
import Scopes from '../scopes.svelte';
1515
import Delete from './delete.svelte';
16+
import { trackEvent } from '$lib/actions/analytics';
1617
1718
let showDelete = false;
1819
let name: string = null;
@@ -37,6 +38,7 @@
3738
$key.expire
3839
);
3940
invalidate(Dependencies.KEY);
41+
trackEvent('submit_key_update_name');
4042
addNotification({
4143
type: 'success',
4244
message: 'API Key name has been updated'
@@ -59,6 +61,7 @@
5961
expire
6062
);
6163
invalidate(Dependencies.KEY);
64+
trackEvent('submit_key_update_expire');
6265
addNotification({
6366
type: 'success',
6467
message: 'API Key expiration has been updated'
@@ -81,6 +84,7 @@
8184
$key.expire
8285
);
8386
invalidate(Dependencies.KEY);
87+
trackEvent('submit_key_update_scopes');
8488
addNotification({
8589
type: 'success',
8690
message: 'API Key scopes has been updated'

src/routes/console/project-[project]/overview/keys/wizard.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import { onDestroy } from 'svelte';
1313
import { onboarding } from '../../store';
1414
import { Dependencies } from '$lib/constants';
15+
import { trackEvent } from '$lib/actions/analytics';
1516
1617
async function onFinish() {
1718
try {
@@ -24,6 +25,7 @@
2425
if ($onboarding) {
2526
invalidate(Dependencies.PROJECT);
2627
}
28+
trackEvent('submit_key_create');
2729
goto(`/console/project-${$page.params.project}/overview/keys/${$id}`);
2830
} catch (error) {
2931
addNotification({

src/routes/console/project-[project]/overview/platforms/[platform]/android.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'android'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Package Name has been updated'

src/routes/console/project-[project]/overview/platforms/[platform]/appleIOS.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
$platform.hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'apple-ios'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Bundle ID has been updated'

src/routes/console/project-[project]/overview/platforms/[platform]/appleMacOS.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
$platform.hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'apple-macos'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Bundle ID has been updated'

src/routes/console/project-[project]/overview/platforms/[platform]/appleTvOS.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
$platform.hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'apple-tvos'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Bundle ID has been updated'

src/routes/console/project-[project]/overview/platforms/[platform]/appleWatchOS.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
$platform.hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'apple-watchos'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Bundle ID has been updated'

src/routes/console/project-[project]/overview/platforms/[platform]/flutterAndroid.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { invalidate } from '$app/navigation';
3+
import { trackEvent } from '$lib/actions/analytics';
34
import { CardGrid, Heading } from '$lib/components';
45
import { Dependencies } from '$lib/constants';
56
import { Button, Form, FormList, InputText } from '$lib/elements/forms';
@@ -26,6 +27,9 @@
2627
$platform.hostname
2728
);
2829
invalidate(Dependencies.PLATFORM);
30+
trackEvent('submit_platform_update', {
31+
type: 'flutter-android'
32+
});
2933
addNotification({
3034
type: 'success',
3135
message: 'Platform Package Name has been updated'

0 commit comments

Comments
 (0)