Repository navigation
Conversation
The manifest id is the analytics event namespace, so the build gate now rejects ids that are not lowercase reverse-DNS with at least 3 segments. Regex lives in scripts/_extension_id.sh so the test can source it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Re-vendor the 0.4.0 tarball rebuilt with REMOTE_ExtensionAnalytics exported (same version string, new contents). Lockfile integrity hashes refreshed in all sample and template frontends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the 0.4.0 tarballs with 0.4.1 (adds REMOTE_ExtensionAnalytics). package.json file: deps rewritten by refresh-common-lib.sh, lockfiles regenerated with npm install, authoring guide references updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add HelloAnalytics (page views + actions, no custom properties) and call it from the list, detail and add/edit components. Extend the rename gate to catch HelloAnalytics and the template event names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A stale EXTENSION_ID makes the host drop every analytics event silently. The naming gate now compares any frontend EXTENSION_ID with the manifest id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Accept double quotes, backticks and an optional type annotation so a reformatted analytics.ts cannot slip past the id parity check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add reference/21-analytics.md as the single owner for extension analytics: wiring through one analytics.ts, default page-view and action coverage, naming rules, the build-time id checks, console verification, and a hard no-properties rule. Existing extensions get an analytics retrofit whenever the skill touches them, for any reason. - SKILL.md: index row, Phase 0 retrofit trigger, Phase 1 default events, Phase 2 analytics.ts, Phase 7 [analytics] console check - 20-ui-library: REMOTE_ExtensionAnalytics host token, picker row, MixpanelService pointer; written against 0.4.1 - 02-authoring-guide: optional frontend.analytics block, rename rows - ng22 migration skill: analytics retrofit as step 9 - UPGRADING-ng-common-lib: current line 0.4.1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- template: fire ask-agent / track-provisioning on the ticket buttons (list row, view header, rail, Review phase action) so the scaffold matches the documented navigation-only coverage - 21-analytics: secrets are refused outright; identifying properties need a second confirmation; retrofit scoped to changes, never starts an Angular 15 migration or a cross-minor lib bump unannounced; invalid-namespace warning row; nav events in the scaffold table - SKILL.md, 02-authoring-guide, ng22 migration: list the nav events consistently; ng22 points at the template for analytics.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The retrofit created analytics.ts before checking whether the frontend could import the token, so an Angular 15 or old-library extension ended up with a broken build. The precondition check is now step 1 and stops before any file is created; 0.1.x counts as the Angular 15 case. The SKILL.md Phase 0 callout names the exceptions, and the known limitations defer to rule 4 for user-typed values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds namespaced product analytics (Mixpanel, through the host portal) to extensions built with the dev kit. Every extension now reports which of its pages are opened and which of its actions succeed, as events namespaced under its manifest id (
<extension id>.<page>.viewed,<extension id>.<action>). By default these are event names only, with no custom properties.This is the dev kit side of duplocloud-internal/duplo-ui#5278 (DUPLOAI-3906: namespaced analytics tracker for extensions). The host builds the event, stamps
extension_id/extension_version, and sends it through the portal's existing consent-gated pipeline, so nothing is sent without the user's analytics consent.Changes
ng-common-lib 0.4.1
duplocloud-internal-ng-common-lib-0.4.1.tgz(addsREMOTE_ExtensionAnalytics), replacing 0.4.0 inpackages/and the template'svendor/.package.jsonand lockfiles in every sample and in the helloworld template.docs/UPGRADING-ng-common-lib.mdnow lists 0.4.1 as the current line.Template (helloworld)
frontend/src/app/analytics.ts: the one wrapper per extension that injects the host token and holdsEXTENSION_ID. It has no properties parameter, on purpose.ask-agent/track-provisioningnavigation events on the ticket buttons.HelloAnalyticsand the template's event names.Build checks (
scripts/build-extension.sh, newscripts/_extension_id.sh)idmust be lowercase reverse-DNS with at least 3 segments, because it is the event namespace.EXTENSION_IDmust match the manifest id, in every declaration form: single, double or backtick quotes, with or without a type annotation. A stale id makes the host drop every event silently.tests/test-build-extension-id.sh.Skill docs
reference/21-analytics.mdcovers wiring, default events, naming rules, the build checks, console verification and the retrofit. It has a hard rule on properties: none by default; secrets are always refused; identifying data is added only after a second confirmation.SKILL.md: an index row, the Phase 0 retrofit trigger (which checks Angular and library-version preconditions before creating any file), the Phase 1 default events, the Phase 2analytics.tsand the Phase 7[analytics]console check.20-ui-library.md,02-authoring-guide.md(the optionalfrontend.analyticsblock) and the ng22 migration skill (analytics retrofit as step 9).Privacy
PRIVACY.mdnow covers namespaced and extension events, and the name properties that are sent.Notes for reviewers
dev. Both aredev pipeline: pin …commits that don't touch these files.REMOTE_ExtensionAnalyticsin the host, the token can't be resolved.🤖 Generated with Claude Code