ethereum / ethereum-org-website

Ethereum.org is a primary online resource for the Ethereum community.
https://ethereum.org/
MIT License
5k stars 4.76k forks source link

Tracking events improvements #11521

Open konopkja opened 10 months ago

konopkja commented 10 months ago

We are currently lacking some event tracking and other tracking needs to be changed.

A. Changes for https://ethereum.org/en/wallets/find-wallet/

  1. expanding and collapsing wallet detail: remove collapse trigger "More info wallet false" and keep only the expand event trigger
  2. Icon links to wallet: "WalletExternalLinkList" tracks link to website, discord and twitter as one event, those 3 action should be separate
  3. Check out main wallet button isnt tracked: Add tracking for the main button in the detail of wallets

    B. Global tracking changes

    event tracking is being translated currently

    • this creates confusion in understanding what audience is included in the main english tracking (it seems to be EN version + other not translated pages), the change should be to keep in only the EN version and for other languages the events should be changes to contain the language shortcut. (if this is too difficult, we can discuss other solutions)
wackerow commented 9 months ago

Noting that #11708 only fixed (A) above... going to reopen to keep track of (B) where a few additional changes will need to be made. These should wait until after the initial Next.js migration is completed.

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 45 days with no activity.

wackerow commented 2 months ago

@konopkja How is this looking with the latest setup? Do we need to dedicate a task to solving B above still, or has this resolved and can be closed? If still needed, could you help clarify here with examples of where this is showing up?

If I recall, there are some places where we're trying to log something where the only string we have available to identify/differentiate it is the translated string.

// src/components/Nav/Mobile/LvlAccordion.tsx:L113

                  onClick={() => {
                    trackCustomEvent({
                      eventCategory: "Mobile navigation menu",
                      eventAction: `Level ${lvl - 1} section changed`,
                      eventName: `${
                        isExpanded ? "Close" : "Open"
                      } section: ${label} - ${description.slice(0, 16)}...`,
                    })
                  }}

This is the one coming to mind right now.. when inside the mobile navigation menu, tapping on the accordions will log which one, identified by it's label, which is the same label being displayed to the user. This value is already translated, and the English version is not available from inside this component.

Not saying it isn't doable, but would just require some thought, especially with the performance epic going on right now. Need to be aware of what bloat could be introduced here.

konopkja commented 2 months ago

the changes to find wallet are implemented, the global changes pending review

konopkja commented 2 months ago

@wackerow this is still an issue, for example on czech version of https://ethereum.org/cs/wallets/find-wallet/ we send:

1. personas are translated Event Action Jste v kryptoměnách nový?
Event Category UserPersona
Event Name Jste v kryptoměnách nový? true
japanese is https://ethereum.org/ja/wallets/find-wallet/ Event Action 暗号資産が始めたの方
Event Category UserPersona
Event Name 暗号資産が始めたの方 true

result in matomo: it will be counted separately from english version of the event (GOOD)

  1. filters

in cs:

Event Action Buy crypto / Sell for fiat
Event Category WalletFilterSidebar
Event Name withdraw_crypto true

in japanese:

Event Action 暗号資産の購入 / 法定通貨への換金
Event Category WalletFilterSidebar
Event Name withdraw_crypto true

result: CS clicks will be included in stats for EN, JA clicks will be separate (BAD)

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity.