Skip to content

fix(console): drop snippetId from the analytics property UI - #14408

Merged
lohanidamodar merged 4 commits into
mainfrom
analytics-drop-snippetid
Oct 27, 2026
Merged

lohanidamodar merged 4 commits into
mainfrom
analytics-drop-snippetid

Conversation

@lohanidamodar

Copy link
Copy Markdown
Member

What

The analytics API no longer returns snippetId on a property. The console still reads it in three ways:

trackingId: property.snippetId || property.$id   // always takes the fallback
{property.snippetId ? (...) : null}              // never renders
Pick<Models.AnalyticsProperty, '$id' | 'name' | 'domain' | 'snippetId'>

Because every read is guarded or has a fallback, nothing is visibly broken — the Snippet ID chips and the "Copy snippet ID" action simply never appear, and tracking snippets already emit property.$id. So this is dead code, except for the content strings, which still tell readers each property has "a public snippet ID". Those are user-facing and wrong.

Changes

  • Removed the Snippet ID chips from InstallTrackingDialog, PropertySettings and analytics/add/View
  • Removed the "Copy snippet ID" item from PropertyContextMenu, and 'snippetId' from its Pick<>
  • trackingId now reads property.$id directly in the four places that built it
  • Dropped 'Snippet ID' and 'Snippet ID:' from the he and ja dictionaries
  • Reworded three content strings and one doc comment that described a public snippet ID

Provenance

Ports appwrite/vibes#568, which was opened before the console moved into this repo. Two things that PR did not cover, because the console has since diverged from vibes:

  • PropertySettings uses t('Snippet ID:') here (with a colon), a second dictionary key vibes never had
  • Three content strings under src/lib/products and src/lib/alternatives that vibes#568 left untouched

Testing

  • tsc --noEmit — no new errors. The repo has 10 pre-existing errors on main (vite config, src/server/middleware/agent-discovery.ts, tests/connect-qa/**); none are in the files touched here.
  • i18n:audit:he and i18n:audit:ja — both clean, confirming the removed keys have no remaining English counterparts.
  • Prettier reports style issues on these files, but the unmodified versions from main report the same, so it is pre-existing drift rather than anything introduced here.

Note

The pinned @appwrite.io/console SDK still declares snippetId: string, so this compiles either way. It stops compiling once the SDK is regenerated without the field — this change is also what unblocks that.

The analytics API no longer returns `snippetId` on a property, so the console
reads a field that is always undefined: the ID chips and the copy action are
guarded by `property.snippetId` and never render, and
`trackingId: property.snippetId || property.$id` always takes the fallback.
Dead code rather than a visible fault -- except the content strings, which
still tell readers each property has "a public snippet ID".

Ports appwrite/vibes#568, opened before the console moved into this repo. Two
things that PR did not cover, because the console has since diverged from
vibes: the `'Snippet ID:'` dictionary key behind PropertySettings' own
wording, and three content strings describing the snippet ID to users.

The pinned SDK still declares `snippetId`, so this compiles either way; it
stops compiling once the SDK is regenerated without the field.
@luxor-code-review

luxor-code-review Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review complete. No blocking issues — approved ✅; 1 nitpick below.

🧹 Nitpicks (1) — 🟢 1 low
  • 🟢 Unify 'public property ID' wording across copy (analytics.ts:58) — The same rewrite uses two different terms for the renamed identifier: products/content/analytics.ts:58 says "Each property has a public ID" while the equivalent copy in products/features/analytics.ts and alternatives/content/posthog.ts says "public property ID".

This PR drops the snippetId field from the console's analytics surfaces and makes client tracking snippets identify properties by their public $id instead. The changes are contained to the console app and its copy/i18n files.

Files Change
apps/console/src/components/pages/projects/$projectId/analytics/_components/* Removes Snippet ID display rows and switches dialogs/context menus/integration snippets to the property $id.
apps/console/src/components/pages/projects/$projectId/analytics/add/View.tsx Add-wizard snippet generation now passes property.$id as the tracking ID.
apps/console/src/lib/analytics-wizard/snippets.ts Snippet builder input drops snippetId and embeds the public property ID in all platform snippets.
apps/console/src/lib/products/* and apps/console/src/lib/alternatives/content/posthog.ts Marketing/product copy reworded around the public property ID.
apps/console/src/lib/i18n/dictionaries/{he,ja}/project-misc.ts Locale dictionaries updated to match the removed/renamed copy.
apps/console/src/components/pages/products/features/analytics/AnalyticsServerSideVisual.tsx Comment-only update.

Reviewed commit: 80439f1

@ghost

ghost commented Oct 13, 2026 •

Copy link
Copy Markdown

🟢 Tier S · Ready to merge

The incremental baseline cleanup matches the type errors removed by the earlier changes, and no issue in the reviewed changes needs fixing.

Removes the obsolete Snippet ID UI and copy action from analytics property flows, and uses each property's $id in tracking examples. It updates related product and help copy, removes unused Hebrew and Japanese translations, and clears the type-error baseline entries resolved by these changes.

Latest changes: The newest commit removes the resolved analytics snippetId diagnostics from apps/console/types-baseline.json, so the baseline reflects the updated code.

Verdict New comments Fixed Still open
✅ Approved 0 0 0
📂 Walkthrough · 14
File Change
apps/console/src/components/pages/products/features/analytics/AnalyticsServerSideVisual.tsx Updates the analytics feature copy to describe the public property ID.
apps/console/src/components/pages/projects/$projectId/analytics/_components/CustomEventsGuideDialog.tsx Uses the property ID in custom-event examples.
apps/console/src/components/pages/projects/$projectId/analytics/_components/InstallTrackingDialog.tsx Uses the property ID in setup examples and removes the Snippet ID chip.
apps/console/src/components/pages/projects/$projectId/analytics/_components/IntegrationSnippets.tsx Uses the property ID in integration examples.
apps/console/src/components/pages/projects/$projectId/analytics/_components/PropertyContextMenu.tsx Removes the Snippet ID copy action and narrows the property type.
apps/console/src/components/pages/projects/$projectId/analytics/_components/PropertySettings.tsx Removes the Snippet ID field from property settings.
apps/console/src/components/pages/projects/$projectId/analytics/add/View.tsx Uses the property ID in setup examples and removes the Snippet ID chip.
apps/console/src/lib/alternatives/content/posthog.ts Rewords the analytics FAQ to refer to a public property ID.
apps/console/src/lib/analytics-wizard/snippets.ts Updates the tracking identifier documentation to use the property ID.
apps/console/src/lib/i18n/dictionaries/he/project-misc.ts Removes unused Snippet ID translations.
apps/console/src/lib/i18n/dictionaries/ja/project-misc.ts Removes unused Snippet ID translations.
apps/console/src/lib/products/content/analytics.ts Clarifies the public property ID used by client code.
apps/console/src/lib/products/features/analytics.ts Rewords the server-side analytics feature description to refer to a public property ID.
apps/console/types-baseline.json Removes type-error entries resolved by the analytics property changes.

Reviewed the commits since e1a1319 · Details · Comment @hansi-codes review to re-run, or mention @hansi-codes with a question.

@ghost ghost 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.

🟢 Tier S · Looks good to merge. Summary

ChiragAgg5k added a commit that referenced this pull request Oct 13, 2026
tsc truncates long types at a length that includes the absolute path, so the same error read differently on CI and locally. --noErrorTruncation prints them whole, and the baseline now includes the snippetId errors main carries since the 19.1.0-rc.1 pin, which #14408 removes.
ChiragAgg5k added a commit that referenced this pull request Oct 14, 2026
tsc truncates long types at a length that includes the absolute path, so the same error read differently on CI and locally. --noErrorTruncation prints them whole, and the baseline now includes the snippetId errors main carries since the 19.1.0-rc.1 pin, which #14408 removes.
lohanidamodar and others added 3 commits October 25, 2026 09:14
The analytics FAQ said "a public ID" while the features page and the
PostHog comparison both say "public property ID" for the same thing.
Removing snippetId from the analytics UI clears 14 baselined errors
across 8 files, and lint:types fails when the baseline allows more than
the tree produces.
@lohanidamodar
lohanidamodar merged commit 6b412e1 into main Oct 27, 2026
35 checks passed
@lohanidamodar
lohanidamodar deleted the analytics-drop-snippetid branch October 27, 2026 05:31
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.

1 participant