Skip to content

docs(builder-codes): add user analytics guide for app developers - #2077

Merged
youssefea merged 10 commits into
masterfrom
docs/builder-codes-track-analytics
Oct 6, 2026
Merged

youssefea merged 10 commits into
masterfrom
docs/builder-codes-track-analytics

Conversation

@bvsakhil

@bvsakhil bvsakhil commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

What changed? Why?

Adds a Track User Analytics section at the end of the Builder Codes for App Developers page.

Base Dashboard no longer shows app-level metrics such as transactions and users, so builders track these themselves. This section tells app developers what to measure (active users, retention, conversion) and where each signal comes from, so they can build their own analytics with whatever stack they use.

The section has a metrics-to-data-source table and four steps: identify users by wallet address, record key moments in the user journey, use onchain data for transactions (Builder Code suffix, sender address, receipt status), and build three dashboards (growth, retention, funnel).

Notes to reviewers

@youssefea, the latest commit addresses all of your review feedback: no agent prompt, no analytics tool names, no Wagmi, and dashboards described as journey stages. Each inline comment has a reply. (The changes briefly lived in #2082, which is now closed.)

Follow-up commits from @youssefea:

  • drop deprecated base.dev attribution check: removes the "Check base.dev" step from the app and agent pages (same change as docs(builder-codes): drop deprecated base.dev attribution check from sub-pages #2066, which this supersedes).
  • show where each analytics signal comes from: makes the steps technical. It covers the EIP-1193 calls and events behind each journey stage, wallet_sendCalls / wallet_getCallsStatus, where the user, Builder Code and success live for EOA transactions vs ERC-4337 UserOperations, the ERC-8021 suffix byte layout, and a Viem + ox function that returns one row per user action. It also removes the guidance on which identifiers to collect.
  • update Dashboard references for Dashboard 2.0: the code now lives at Settings → Project Settings → Builder Code (with an Encoded String format), apps are now projects, and the Dashboard shows spot trading volume, borrow TVL and lending TVL instead of transaction and user counts. Source: protocols/base-dev-frontend (builder-code-section.tsx, metric-tiles.tsx, builder-code-banner.tsx, Issue on docs #676, Update node-providers dRPC entry #715).

How has it been tested?

  • get-attributed-activity.ts type-checks under tsc --strict and was run against Base mainnet: it decoded bc_lv99qw8t from EOA tx 0x702c00b9…e049 and returned the UserOperation sender for EntryPoint v0.7 tx 0x3309c7c6…e049

  • npm test: 125 passed, 0 failed

  • node scripts/lint-mdx.js on the changed file: 0 errors, 0 warnings

  • node scripts/check-terminology.js: passed

  • node scripts/validate-docs-structure.js: passed (no navigation changes)

  • Rendered and reviewed locally with mint dev

Screenshots

To be added. Verified locally at /specifications/builder-codes/for-app-developers#track-user-analytics.

Generated with Toshi

Adds a Track User Analytics section to the Builder Codes for App Developers page with a copy-paste prompt builders can give their coding agent to set up product analytics.
@bvsakhil
bvsakhil requested a review from youssefea October 6, 2026 09:53
@mintlify

mintlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
base 🟢 Ready View Preview Oct 6, 2026, 5:49 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@cb-heimdall

cb-heimdall commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews ✅ 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@youssefea youssefea left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for putting this together. Two overall points before merging:

  1. No external tools. We don't want to recommend or name PostHog (or Plausible, Mixpanel, Amplitude) in the docs. The section should stay tool-agnostic.
  2. No copy-paste prompt. Rather than shipping an agent prompt in the guide, describe what the app developer needs to track and where that data comes from (as a few plain steps). How they prompt their own agent, and which stack they use, is up to them. We just want to give them enough information to build their own analytics.

Related: no need to mention Wagmi either. The guidance should hold for any wallet library. Pointers to the onchain signals worth looking at (e.g. transactions carrying their Builder Code, the sending wallet addresses, success/revert status) are more useful and longer-lived than library-specific hooks.

Inline comments below.

Comment thread docs/specifications/builder-codes/for-app-developers.mdx Outdated
Comment thread docs/specifications/builder-codes/for-app-developers.mdx Outdated
Comment thread docs/specifications/builder-codes/for-app-developers.mdx Outdated
Comment thread docs/specifications/builder-codes/for-app-developers.mdx Outdated
Comment thread docs/specifications/builder-codes/for-app-developers.mdx Outdated
@bvsakhil

bvsakhil commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #2082, which addresses all review feedback here. I'll close this once #2082 is approved.

Generated with Toshi

@bvsakhil

bvsakhil commented Oct 6, 2026

Copy link
Copy Markdown
Collaborator Author

Update: I've pushed the review fixes directly to this PR (and closed #2082) so the review stays in one place. Please ignore the earlier references to #2082. All five comments are addressed in the latest commit.

Generated with Toshi

@bvsakhil
bvsakhil requested a review from youssefea October 6, 2026 15:32
Addresses review feedback: removes the agent prompt, analytics tool names and Wagmi references; replaces them with steps describing what to measure and which onchain signals to use.
youssefea and others added 3 commits October 6, 2026 18:35
Base Dashboard 2.0 no longer has the Onchain transaction-type view, so the
Check base.dev step sent developers to a screen that no longer exists.
Matches the overview page (#2024) and supersedes #2066.

Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Replaces the generic Track User Analytics steps with the concrete data
sources behind each journey stage:

- read the user identifier from the EIP-1193 provider (eth_requestAccounts,
  accountsChanged, chainChanged) and explain smart account addresses
- list the in-app signal for open, connect, submit and success, including
  the wallet_sendCalls bundle ID and wallet_getCallsStatus resolution and
  EIP-1193 error code 4001
- explain where the user, Builder Code and success live for EOA
  transactions vs ERC-4337 UserOperations, the ERC-8021 suffix byte
  layout, and a Viem + ox function that returns one row per user action
- define the active user, retention and funnel calculations

Drops the guidance on which identifiers to collect; the section is about
finding the right data, not prescribing a data policy.

Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Base Dashboard 2.0 replaced the transaction and user counts with spot
trading volume, borrow TVL and lending TVL derived from Builder Code
activity, renamed apps to projects, and moved the code to
Settings > Project Settings > Builder Code.

- point the Builder Code location and code comments to the new path
- document the Encoded String format (the ready-made dataSuffix)
- replace the analytics benefit claims on the overview, app and agent
  pages with what the Dashboard shows today, linking to Track User
  Analytics for users, retention and conversion

Co-authored-by: Toshi <toshi-noreply@coinbase.com>
base.dev now 302-redirects to dashboard.base.org. Points the Builder Codes
links and the two data-driven-growth redirects straight at the canonical
host. blog.base.dev, verify.base.dev and api.base.dev are separate
services and are unchanged.

Co-authored-by: Toshi <toshi-noreply@coinbase.com>
Co-authored-by: Toshi <toshi-noreply@coinbase.com>
@youssefea
youssefea requested a review from soheimam October 6, 2026 17:52
@youssefea
youssefea merged commit 7a887d5 into master Oct 6, 2026
15 checks passed
@youssefea
youssefea deleted the docs/builder-codes-track-analytics branch October 6, 2026 18:15

@b40150650-design b40150650-design left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Very glad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants