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

Track GA for safe actions#1302

Merged
mmv08 merged 5 commits intodevelopmentfrom
issue-1213
Aug 31, 2020
Merged

Track GA for safe actions#1302
mmv08 merged 5 commits intodevelopmentfrom
issue-1213

Conversation

@nicosampler
Copy link
Contributor

@nicosampler nicosampler commented Aug 28, 2020

Closes #1213

Add the following GA events for specific page views:

SafelistSidebar
Assets
Collectibles
Transactions
Apps (name)
Settings

  • SafeDetails
  • Owners
  • Policies
  • Advanced
  • SpendingLimits

@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Aug 28, 2020

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 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@ghost
Copy link

ghost commented Aug 28, 2020

Travis automatic deployment:
https://pr1302--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Aug 28, 2020

Travis automatic deployment:
https://pr1302--safereact.review.gnosisdev.com/app

@nicosampler nicosampler requested review from Agupane and mmv08 August 28, 2020 19:57
@nicosampler nicosampler self-assigned this Aug 28, 2020
Copy link
Contributor

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

All good, just a few minor things

Could you please also fix eslint issues from the bot? They're minor and shouldn't take a lot of time

}
}
type Props = {
addressBook: unknown
Copy link
Contributor

Choose a reason for hiding this comment

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

We have a type for addressBook

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm making use of it when it calls to getOwnersWithNameFromAddressBook, but If I define it at the Props level it fails. A refactor it's needed, but we should not take care of that in this PR.


const toggleSidebar = () => {
if (!isOpen) {
trackPageEvent({ action: SAFE_NAVIGATION_EVENT, category: 'SafeListSidebar' })
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better if we write the category normally instead of following PascalCase

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it like so because it should be easier to filter in GA dashboard.

Copy link
Contributor

Choose a reason for hiding this comment

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

The last time I used analytics there were no difficulties filtering events written nicely with spaces.

)

return { trackPage }
const trackPageEvent = useCallback(
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be just trackEvent?

const { trackPageEvent } = useAnalytics()

useEffect(() => {
trackPageEvent({ action: SAFE_NAVIGATION_EVENT, category: 'Collectibles' })
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we're using category/event/action wrong:
https://github.com/react-ga/react-ga#reactgaeventargs

IMO It should be
category - App Navigation
action - Navigation
label - The name of the view opened


const toggleSidebar = () => {
if (!isOpen) {
trackPageEvent({ action: SAFE_NAVIGATION_EVENT, category: 'SafeListSidebar' })
Copy link
Contributor

Choose a reason for hiding this comment

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

The last time I used analytics there were no difficulties filtering events written nicely with spaces.

@ghost
Copy link

ghost commented Aug 31, 2020

Travis automatic deployment:
https://pr1302--safereact.review.gnosisdev.com/app

@nicosampler
Copy link
Contributor Author

@mikheevm changes applied

Copy link
Contributor

@mmv08 mmv08 left a comment

Choose a reason for hiding this comment

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

Thank you!

@ghost
Copy link

ghost commented Aug 31, 2020

Travis automatic deployment:
https://pr1302--safereact.review.gnosisdev.com/app

@ghost
Copy link

ghost commented Aug 31, 2020

Travis automatic deployment:
https://pr1302--safereact.review.gnosisdev.com/app

@mmv08 mmv08 merged commit f7d4cfe into development Aug 31, 2020
@mmv08 mmv08 deleted the issue-1213 branch August 31, 2020 14:33
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 2020
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.

Track page visit events

2 participants