Page MenuHomePhabricator

[e.cash] Implement google analytics
ClosedPublic

Authored by bytesofman on Wed, Oct 29, 21:37.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCa2932cfdf149: [e.cash] Implement google analytics
Summary

Dropped the ball on this one and did not implement matching the old site. Did not notice until checking today.

Implement.

Test Plan

Land and check that it is being picked up

Diff Detail

Repository
rABC Bitcoin ABC
Branch
ga-back-in-landing
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 34909
Build 69280: Build Diff
Build 69279: arc lint + arc unit

Event Timeline

Tail of the build log:

#12 0.536 
#12 0.536 > e.cash@0.1.0 build
#12 0.536 > next build
#12 0.536 
#12 1.093 Attention: Next.js now collects completely anonymous telemetry regarding usage.
#12 1.094 This information is used to shape Next.js' roadmap and prioritize features.
#12 1.094 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
#12 1.094 https://nextjs.org/telemetry
#12 1.094 
#12 1.197    ▲ Next.js 15.3.2
#12 1.197    - Environments: .env
#12 1.198 
#12 1.211    Creating an optimized production build ...
#12 17.57  ✓ Compiled successfully in 13.0s
#12 17.58    Linting and checking validity of types ...
#12 21.33    Collecting page data ...
#12 25.18    Generating static pages (0/17) ...
#12 25.63  ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/staking". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
#12 25.63     at i (/app/.next/server/chunks/102.js:3:43867)
#12 25.63     at d (/app/.next/server/chunks/102.js:16:36234)
#12 25.63     at n (/app/.next/server/chunks/571.js:1:270)
#12 25.63     at nF (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:46843)
#12 25.63     at nH (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:48618)
#12 25.63     at nH (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:64688)
#12 25.63     at nW (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:67762)
#12 25.63     at nz (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:65337)
#12 25.63     at nY (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:71193)
#12 25.63     at nX (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:69876)
#12 25.63 Error occurred prerendering page "/staking". Read more: https://nextjs.org/docs/messages/prerender-error
#12 25.63 Export encountered an error on /staking/page: /staking, exiting the build.
#12 25.63  ⨯ Next.js build worker exited with code: 1 and signal: null
#12 25.68 npm notice
#12 25.68 npm notice New major version of npm available! 10.9.4 -> 11.6.2
#12 25.68 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2
#12 25.68 npm notice To update run: npm install -g npm@11.6.2
#12 25.68 npm notice
#12 ERROR: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
------
 > [builder 6/6] RUN npm run build:
25.63     at nY (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:71193)
25.63     at nX (/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:76:69876)
25.63 Error occurred prerendering page "/staking". Read more: https://nextjs.org/docs/messages/prerender-error
25.63 Export encountered an error on /staking/page: /staking, exiting the build.
25.63  ⨯ Next.js build worker exited with code: 1 and signal: null
25.68 npm notice
25.68 npm notice New major version of npm available! 10.9.4 -> 11.6.2
25.68 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2
25.68 npm notice To update run: npm install -g npm@11.6.2
25.68 npm notice
------
Dockerfile:17
--------------------
  15 |     COPY $PREVIEW_BUILD next.config.ts
  16 |     
  17 | >>> RUN npm run build
  18 |     
  19 |     FROM node:22-bookworm-slim AS runner
--------------------
ERROR: failed to solve: process "/bin/sh -c npm run build" did not complete successfully: exit code: 1
Build preview-e.cash failed with exit code 1

back out the config changes, did not need them before

wrap in Suspense to fix build

Fabien requested changes to this revision.Thu, Oct 30, 09:56
Fabien added a subscriber: Fabien.
Fabien added inline comments.
web/e.cash/app/components/Analytics.tsx
16 ↗(On Diff #56356)

it's probably independent of whether window is undefined at this point :)

This revision now requires changes to proceed.Thu, Oct 30, 09:56
This revision is now accepted and ready to land.Thu, Oct 30, 11:29
This revision was automatically updated to reflect the committed changes.