Skip to content

Commit 0ec0206

Browse files
authored
feat: Added plausible custom events (#389)
1 parent e5c3ec2 commit 0ec0206

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

src/features/app-interfaces/components/create/from-app-id-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ export function FromAppIdCard({ machine }: Props) {
117117
onSubmit={fromAppIdSelected}
118118
formAction={
119119
<FormActions>
120-
<SubmitButton>Use existing</SubmitButton>
120+
{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
121+
<SubmitButton className="plausible-event-name=app-lab-use-existing-app-id">Use existing</SubmitButton>
121122
</FormActions>
122123
}
123124
>

src/features/app-interfaces/components/create/from-deployment-card.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export function FromDeploymentCard({ machine }: Props) {
3232
<span>Deploy a new app and create an app interface.</span>
3333
</div>
3434
<div className="flex grow flex-col">
35-
<div className="ml-auto mt-auto">
35+
{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
36+
<div className="plausible-event-name=app-lab-deploy-new-app ml-auto mt-auto">
3637
<Button onClick={fromDeploymentSelected} {...disabledProps}>
3738
{deployAppLabel}
3839
</Button>

src/features/fund/components/fund-account-form.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,14 @@ export function FundAccountForm({ onCreateReceiver, onSubmit, limit, defaultRece
7777
onSubmit={fundAccount}
7878
formAction={
7979
<FormActions>
80-
<SubmitButton>{onCreateReceiver ? 'Create and Fund' : 'Fund'}</SubmitButton>
80+
<SubmitButton
81+
// eslint-disable-next-line tailwindcss/no-custom-classname
82+
className={
83+
onCreateReceiver ? 'plausible-event-name=fund-account-form-create-and-fund' : 'plausible-event-name=fund-account-form-fund'
84+
}
85+
>
86+
{onCreateReceiver ? 'Create and Fund' : 'Fund'}
87+
</SubmitButton>
8188
</FormActions>
8289
}
8390
>

src/features/transaction-wizard/components/transactions-builder.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable tailwindcss/no-custom-classname */
12
import algosdk from 'algosdk'
23
import { useCallback, useMemo, useState } from 'react'
34
import { DialogBodyProps, useDialogForm } from '@/features/common/hooks/use-dialog-form'
@@ -343,7 +344,12 @@ export function TransactionsBuilder({
343344
<div className="mb-4 flex items-center gap-2">
344345
{title}
345346
{!disableAddTransaction && (
346-
<Button variant="outline-secondary" onClick={createTransaction} className="ml-auto" icon={<Plus size={16} />}>
347+
<Button
348+
variant="outline-secondary"
349+
onClick={createTransaction}
350+
className="plausible-event-name=txn-wizard-add-txn ml-auto"
351+
icon={<Plus size={16} />}
352+
>
347353
{addTransactionLabel}
348354
</Button>
349355
)}
@@ -396,15 +402,20 @@ export function TransactionsBuilder({
396402
</Button>
397403
{onSimulated && (
398404
<AsyncActionButton
399-
className="w-28"
405+
className="plausible-event-name=txn-wizard-simulate-txn w-28"
400406
onClick={simulateTransactions}
401407
icon={<SquarePlay size={16} />}
402408
{...simulateButtonDisabledProps}
403409
>
404410
Simulate
405411
</AsyncActionButton>
406412
)}
407-
<AsyncActionButton className="w-28" onClick={sendTransactions} icon={sendButtonConfig.icon} {...sendButtonDisabledProps}>
413+
<AsyncActionButton
414+
className="plausible-event-name=txn-wizard-send-txn w-28"
415+
onClick={sendTransactions}
416+
icon={sendButtonConfig.icon}
417+
{...sendButtonDisabledProps}
418+
>
408419
{sendButtonConfig.label}
409420
</AsyncActionButton>
410421
</div>

0 commit comments

Comments
 (0)