-
Notifications
You must be signed in to change notification settings - Fork 362
Conversation
CLA Assistant Lite All Contributors have signed the CLA. |
ESLint Summary View Full Report
Report generated by eslint-plus-action |
E2E Tests Passed ✅ |
<Link to={WELCOME_ROUTE}> | ||
<Img alt="Gnosis Safe" height={36} src={SafeLogo} testId="heading-gnosis-logo" id="safe-logo" /> | ||
</Link> | ||
<Track {...SAFE_OVERVIEW_TRACKING_EVENTS.HOME}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to track clicks on internal links?
The navigation should be tracked by page views/URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is correct. The information we gain with this is the button that was clicked and the page it was clicked on. If that is not important I suggest we remove explicit tracking for internal links and solely rely on the pageview event. cc @johannesmoormann
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only track internal links if we want to have the chain data or a payload alongside it.
@@ -103,7 +103,7 @@ export const CurrencyDropdown = ({ testId }: { testId: string }): React.ReactEle | |||
<MenuItem | |||
className={classes.listItem} | |||
key={currencyName} | |||
onClick={() => onCurrentCurrencyChangedHandler(currencyName)} | |||
onClick={() => handleCurrencyChange(currencyName)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't make unnecessary and unrelated changes like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really happy about this. I have a few comments and the tests are failing.
@@ -37,6 +39,7 @@ export const CurrencyDropdown = ({ testId }: { testId: string }): React.ReactEle | |||
) | |||
|
|||
const handleClick = (event: React.MouseEvent<HTMLElement>) => { | |||
trackEventGTM({ ...SAFE_OVERVIEW_TRACKING_EVENTS.OPEN_CURRENCY_MENU }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to spread this.
@@ -46,6 +48,9 @@ export const loadIntercom = async (): Promise<void> => { | |||
user_id: intercomUserId, | |||
}) | |||
intercomLoaded = true | |||
;(window as any).Intercom('onShow', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You know what I'm gonna say 👀 Maybe we should add an issue for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the refactor should be no problem since we did it already for the Beamer object but I didn't want to blow up this PR.
src/utils/intercom.ts
Outdated
@@ -46,6 +48,9 @@ export const loadIntercom = async (): Promise<void> => { | |||
user_id: intercomUserId, | |||
}) | |||
intercomLoaded = true | |||
;(window as any).Intercom('onShow', () => { | |||
trackEventGTM({ ...SAFE_OVERVIEW_TRACKING_EVENTS.OPEN_INTERCOM }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to spread this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…erview-layout # Conflicts: # src/components/AppLayout/Sidebar/SafeHeader/index.tsx
What it solves
Resolves partially #3408
Addresses the track in the "Overview" layout
How this PR fixes it
Attaches tracking events to parts of the "Overview" screen as per https://docs.google.com/document/d/1RY9oaRV4x8N0wsWrU1H0O_EpQOn9pmF2wq25l0H-EKc/edit#heading=h.c4txlg1cdztw
How to test it
The clicked buttons shall be firing tags to be read in GTM
Screenshots