Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Track number of delegate transactions #4344

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

usame-algan
Copy link
Member

What it solves

Resolves #4206

How this PR fixes it

  • Extends trackTxEvents to handle delegate form submissions

How to test it

  1. Open a Safe that has a delegate
  2. Create a transaction as a delegate
  3. Observe a GA event being emitted once the user submits the tx in their wallet

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

github-actions bot commented Oct 9, 2024

Copy link

github-actions bot commented Oct 9, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

🎉 Global Bundle Size Decreased

Page Size (compressed)
global 961.22 KB (-1 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

Seven Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/apps/open 53.11 KB (🟡 +16 B) 1014.33 KB
/transactions 73.53 KB (🟡 +16 B) 1.01 MB
/transactions/history 73.5 KB (🟡 +16 B) 1.01 MB
/transactions/messages 39.18 KB (🟡 +16 B) 1000.4 KB
/transactions/msg 29.53 KB (🟡 +16 B) 990.75 KB
/transactions/queue 31.28 KB (🟡 +16 B) 992.51 KB
/transactions/tx 21.09 KB (🟡 +16 B) 982.31 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

Copy link

github-actions bot commented Oct 9, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.09% (-0.01% 🔻)
12002/15370
🔴 Branches
58.14% (-0.03% 🔻)
3088/5311
🟡 Functions
65.07% (-0.02% 🔻)
1889/2903
🟡 Lines
79.63% (-0.01% 🔻)
10833/13605
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / index.tsx
86.21% (-0.85% 🔻)
71.58% (-2.33% 🔻)
42.86% (-7.14% 🔻)
85.54% (-0.88% 🔻)
🔴
... / DelegateForm.tsx
38.3% (-0.83% 🔻)
0% 0%
41.86% (-1% 🔻)

Test suite run success

1498 tests passing in 203 suites.

Report generated by 🧪jest coverage report action from 548a048

@usame-algan usame-algan changed the title fix: Add delegate transactions to track call fix: Track number of delegate transactions Oct 9, 2024
Comment on lines +68 to +72
const creationEvent = isRoleExecution
? TX_EVENTS.CREATE_VIA_ROLE
: isDelegateCreation
? TX_EVENTS.CREATE_VIA_DELEGATE
: TX_EVENTS.CREATE
Copy link
Collaborator

@compojoom compojoom Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you know that nested nested ternaries give me so such anxiety :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets hope this is the last flag we have to pass to this function 🤞

@compojoom compojoom merged commit e444326 into dev Oct 9, 2024
15 checks passed
@compojoom compojoom deleted the delegate-analytics branch October 9, 2024 10:57
@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2024
@liliya-soroka
Copy link
Member

Verified

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add analytics for delegate support
3 participants