Skip to content
This repository was archived by the owner on Nov 10, 2023. It is now read-only.

feat: improve analytics #3415

Merged
merged 24 commits into from
Mar 24, 2022
Merged

feat: improve analytics #3415

merged 24 commits into from
Mar 24, 2022

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Feb 2, 2022

What it solves

Resolves #3408

How this PR fixes it

Events

How to test

  • Open the Safe and observe the the GTM script only injects when the analytics cookie checkbox is accepted
  • Open the Safe in GTM preview
  • Observe tracking of Safe creation/loading and overview according to the first two sections here in the console info

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Feb 2, 2022

Pull Request Test Coverage Report for Build 2035146110

  • 111 of 205 (54.15%) changed or added relevant lines in 54 files are covered.
  • 24 unchanged lines in 13 files lost coverage.
  • Overall coverage increased (+0.4%) to 35.516%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/AppLayout/Header/components/NetworkSelector.tsx 0 1 0.0%
src/components/CookiesBanner/index.tsx 0 1 0.0%
src/components/SafeListSidebar/index.tsx 0 1 0.0%
src/logic/wallets/onboard.ts 0 1 0.0%
src/routes/LoadSafePage/steps/LoadSafeAddressStep.tsx 4 5 80.0%
src/routes/index.tsx 0 1 0.0%
src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx 0 1 0.0%
src/routes/safe/components/AddressBook/ImportEntriesModal/index.tsx 0 1 0.0%
src/routes/safe/components/Apps/components/AddAppForm/index.tsx 0 1 0.0%
src/routes/safe/components/Balances/SendModal/screens/ReviewSendFundsTx/index.tsx 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/components/SafeListSidebar/index.tsx 1 0%
src/components/SafeListSidebar/SafeList/index.tsx 1 0%
src/routes/safe/components/AddressBook/EllipsisTransactionDetails/index.tsx 1 10.0%
src/routes/safe/components/AddressBook/index.tsx 1 0%
src/routes/safe/components/Apps/components/AppFrame.tsx 1 0%
src/routes/safe/components/Balances/SendModal/screens/ReviewSendFundsTx/index.tsx 1 0%
src/routes/safe/components/Settings/ThresholdSettings/ChangeThreshold/index.tsx 1 0%
src/routes/safe/components/Settings/Appearance/index.tsx 2 0%
src/routes/safe/components/Settings/SafeDetails/index.tsx 2 0%
src/routes/safe/components/Transactions/TxList/hooks/useActionButtonsHandlers.ts 2 1.82%
Totals Coverage Status
Change from base Build 2027159306: 0.4%
Covered Lines: 3465
Relevant Lines: 8832

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Feb 2, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1958353835

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Apps List Safe Apps List

* fix: load GTM from cookie banner

* fix: GTM env init check
@katspaugh katspaugh added the Epic label Feb 3, 2022
* feat: create `Track` HoC

* fix: remove unnecessary `undefined` check

* fix: prop names/type tweak + conditional payload

* fix: short props, throw when Fragment + add tests

* fix: rename file extension
* fix: migrate pageview tracking to GTM

* fix: cleanup event emission
* fix: add chain data to tracking + cross-env tests

* fix: separate chain data from payload

* fix: track `shortName` instead of `chainName`
@github-actions
Copy link

github-actions bot commented Feb 16, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

github-actions bot commented Mar 1, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 3 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

* feat: track create/load Safe steppers

* fix: payload tracking in Safe create/load

* fix: Track Safe creation events

* fix: rename event + remove unnecessary var

* fix: payload test

Co-authored-by: Usame Algan <usame.algan@gnosis.pm>
@iamacook iamacook temporarily deployed to Manual March 2, 2022 11:00 Inactive
@iamacook iamacook temporarily deployed to Manual March 3, 2022 08:18 Inactive
* feat: track create/load Safe steppers

* fix: payload tracking in Safe create/load

* fix: Track Safe creation events

* fix: rename event + remove unnecessary var

* fix: payload test

* wrap overview buttons with <Track /> HOC

* fix: Adjust structure of dataLayer object for trackEvent call

* refactor: Extract track variables

* chore: Revert method name refactor

* refactor: Move safe overview tags to its own file

* feat: Add tracking to currency change, intercom and help center

* fix: Remove spreads where possible

* fix: failing test

Co-authored-by: iamacook <aaron.cook@gnosis.pm>
Co-authored-by: Usame Algan <usame.algan@gnosis.pm>
@iamacook iamacook temporarily deployed to Manual March 3, 2022 09:39 Inactive
* fix: remove GA

* fix: remove GA from test
@iamacook iamacook temporarily deployed to Manual March 3, 2022 11:56 Inactive
@iamacook
Copy link
Member Author

iamacook commented Mar 3, 2022

@johannesmoormann, it seems as though GTM doesn't have any cookies. Do we need to include it conditionally based on the cookie selection? It currently loads according to the choice made by the user. I can't confirm if, after implementing funnels in GA, that cookies will then appear though.

What do you think?

@iamacook iamacook requested a review from usame-algan March 3, 2022 15:02
iamacook added 5 commits March 7, 2022 16:36
* fix: top level tracking + unload tracking

* fix: use shorthand

* fix: add dependency

* fix: tracking events

* fix: track via listener

* fix: `waitFor` event listener

* fix: lint

* fix: add GA `eventValue` + centralise events

* fix: cleanup

* fix: `currentStep` as value

* fix: remove `eventValue` + less verbose events

* fix: add dependency

* fix: use ref in variable

* fix: test

* fix: check that GTM is loaded + remove comment

* fix: return early

* fix: track all events (#3675)

* fix: add legacy events

* fix: incorrect events

* fix: remove unnecessary dependencies

* feat: add new tracking events

* fix: test

* fix: memoize tracking + always init GTM

* fix: spending limit tracking label

* fix: rm `navigation` category + rm `pageview` vars

* fix: remove memoization

* fix: track wallet, (un-)pin/named Safe Apps, App click

* fix: use campaign link for iPhone app
@github-actions
Copy link

github-actions bot commented Mar 21, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 3 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

* fix: events + don't trigger GA on dev env

* fix: remove dev flag from events

* fix: only track changing `pathname`

* fix: don't cache anonymised path
Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

🚀

@iamacook iamacook merged commit 5ec343f into dev Mar 24, 2022
@iamacook iamacook deleted the improve-analytics branch March 24, 2022 15:28
@github-actions github-actions bot locked and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EPIC] Improving app analytics
5 participants