You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Custom click events for external links (notably wallet external links on /wallets/find-wallet) appear to fire unreliably in production. When clicking a wallet's website/social icons, browser event inspectors (Omnibug) sometimes show only Matomo's automatic exitclick/outlink hit and no custom trackEvent — even though the links have customEventOptions set in source.
This is filed for investigation — the root cause below is a strong hypothesis, not yet confirmed live.
Observed
On production, clicking the expanded-card social/website icons on find-wallet fires only exitclick in Omnibug; the WalletExternalLinkList / Go to wallet custom event does not appear.
The behavior is nondeterministic: the main "Visit website" button (Tap main button) has been observed firing its custom event, while a social link in the same session did not.
Matomo data (site 4, last 30 days) under WalletExternalLinkList:
Tap main button: 14,629 events
Go to wallet: 349 events
The Go to wallet (website + Discord + Twitter inside the expanded card) count looks implausibly low relative to the main button, consistent with those events being dropped.
Root-cause hypothesis (needs confirmation)
trackCustomEvent defers the trackEvent push into requestIdleCallback:
External links render as <a target="_blank" …> (src/components/ui/Link.tsx, BaseLink external branch). Clicking one backgrounds the current tab, where requestIdleCallback is heavily throttled / may not run — so the deferred trackEvent is lost. Matomo's built-in outlink tracking (exitclick) is separate and synchronous, so it survives. Whether the idle callback fires before the tab loses focus is timing-dependent, which matches the nondeterministic behavior observed.
Affected code
src/lib/utils/matomo.ts — trackCustomEvent (the scheduleIdleCallback deferral)
Find-wallet call sites: src/components/FindWalletProductTable/WalletSubComponent.tsx (social/website icons, Go to wallet), WalletInfo.tsx (main button, Tap main button)
The find-wallet rebuild in feat: rebuild find-wallet on the shared catalog (revamp PR 2) #18846 uses the sametrackCustomEvent util (app/[locale]/wallets/find-wallet/@modal/(.)[wallet]/page.tsx, [wallet]/page.tsx), so it inherits the same behavior — the redesign does not fix or worsen this.
Impact
Any external-link custom event routed through trackCustomEvent (i.e. all BaseLink external clicks) may be under-reported, most visibly wallet external-link click-through — the primary success metric for the wallet finder.
Not a blocker for the planned find-wallet A/B test: both variations use the same util, so under-counting is symmetric across arms and the relative comparison stays valid; only the absolute conversion counts are understated.
How to verify
Load https://ethereum.org/wallets/find-wallet/ in prod, open DevTools → Network, filter for the Matomo endpoint.
Expand a wallet card, click a social/website icon, and check whether a trackEvent request (e_c=WalletExternalLinkList) actually leaves — compare when the click opens a new tab vs when navigation is prevented / same-tab.
Repeat with the tab kept in the foreground vs immediately backgrounded to test the requestIdleCallback throttling theory.
Possible fixes to evaluate
Fire the trackEventsynchronously on click for external links (drop the requestIdleCallback wrapper for user-initiated click-throughs), or
Use a sendBeacon / keepalive transport so the hit survives navigation/backgrounding.
After a fix, compare the WalletExternalLinkList event volume before/after to quantify the recovered events.
Related
Analytics context: the Download a wallet goal (Matomo goal 1) matches event_action == "Go to wallet", which is only the rarely-clicked social links (~349/mo), not the main wallet click-through (Tap main button, ~14.6k/mo) — a separate goal-configuration issue worth flagging to whoever owns Matomo goals.
Summary
Custom click events for external links (notably wallet external links on
/wallets/find-wallet) appear to fire unreliably in production. When clicking a wallet's website/social icons, browser event inspectors (Omnibug) sometimes show only Matomo's automaticexitclick/outlink hit and no customtrackEvent— even though the links havecustomEventOptionsset in source.This is filed for investigation — the root cause below is a strong hypothesis, not yet confirmed live.
Observed
On production, clicking the expanded-card social/website icons on find-wallet fires only
exitclickin Omnibug; theWalletExternalLinkList/Go to walletcustom event does not appear.The behavior is nondeterministic: the main "Visit website" button (
Tap main button) has been observed firing its custom event, while a social link in the same session did not.Matomo data (site 4, last 30 days) under
WalletExternalLinkList:Tap main button: 14,629 eventsGo to wallet: 349 eventsThe
Go to wallet(website + Discord + Twitter inside the expanded card) count looks implausibly low relative to the main button, consistent with those events being dropped.Root-cause hypothesis (needs confirmation)
trackCustomEventdefers thetrackEventpush intorequestIdleCallback:External links render as
<a target="_blank" …>(src/components/ui/Link.tsx,BaseLinkexternal branch). Clicking one backgrounds the current tab, whererequestIdleCallbackis heavily throttled / may not run — so the deferredtrackEventis lost. Matomo's built-in outlink tracking (exitclick) is separate and synchronous, so it survives. Whether the idle callback fires before the tab loses focus is timing-dependent, which matches the nondeterministic behavior observed.Affected code
src/lib/utils/matomo.ts—trackCustomEvent(thescheduleIdleCallbackdeferral)src/components/ui/Link.tsx—BaseLinkcreateClickHandler→ externalonClicksrc/components/FindWalletProductTable/WalletSubComponent.tsx(social/website icons,Go to wallet),WalletInfo.tsx(main button,Tap main button)trackCustomEventutil (app/[locale]/wallets/find-wallet/@modal/(.)[wallet]/page.tsx,[wallet]/page.tsx), so it inherits the same behavior — the redesign does not fix or worsen this.Impact
trackCustomEvent(i.e. allBaseLinkexternal clicks) may be under-reported, most visibly wallet external-link click-through — the primary success metric for the wallet finder.How to verify
https://ethereum.org/wallets/find-wallet/in prod, open DevTools → Network, filter for the Matomo endpoint.trackEventrequest (e_c=WalletExternalLinkList) actually leaves — compare when the click opens a new tab vs when navigation is prevented / same-tab.requestIdleCallbackthrottling theory.Possible fixes to evaluate
trackEventsynchronously on click for external links (drop therequestIdleCallbackwrapper for user-initiated click-throughs), orsendBeacon/keepalivetransport so the hit survives navigation/backgrounding.WalletExternalLinkListevent volume before/after to quantify the recovered events.Related
Download a walletgoal (Matomo goal 1) matchesevent_action == "Go to wallet", which is only the rarely-clicked social links (~349/mo), not the main wallet click-through (Tap main button, ~14.6k/mo) — a separate goal-configuration issue worth flagging to whoever owns Matomo goals.