Add tutorial: personalize by account with custom Signals attribute keys - #1890
Add tutorial: personalize by account with custom Signals attribute keys#1890jborlase-snowplow wants to merge 6 commits into
Conversation
New six-page tutorial (tutorials/signals-account-attributes/) showing how to define a custom attribute key from an entity property, compute account-level attributes (approx_count_distinct, counter, last) across all users of a B2B account, and trigger account-level interventions. Sibling of python-tracking-and-signals, same imaginary SaaS app, now multi-tenant. All code blocks executed end-to-end against a live pipeline and Signals environment; Console flow verified with fresh screenshots. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Documentation style reviewScope: writing quality, style guide compliance, terminology, structure, frontmatter, links, MDX components. Nothing here touches technical correctness. Link check — all internal targets verified to exist ( Nice work overall: frontmatter is complete on every page, Should fix1. Troubleshooting sections jump straight from heading to bullets
CLAUDE.md: "Precede every heading with at least one paragraph of explanatory text." Style guide, Page structure: "Precede every heading and list with at least one paragraph of prose", and Lists: "Introduce lists with a sentence ending in a colon." Add a lead-in to each, for example 2. List item capitalization and trailing periods are inconsistent, including within one page
Style guide, Lists: "Capitalize the first word of each item" and "No period at the end unless the item contains multiple sentences." So the first list should be capitalized, and the first two Variations items (single sentences) should lose their trailing periods. The lowercase pattern also appears in 3.
Style guide, Markdown formatting: "Use Tip for actions, Note or Info for information, Warning for data loss or security risks, Danger for pipeline outages." The first is configuration guidance ( 4. Bold on non-UI text
CLAUDE.md: "Use bold only for UI elements (buttons, page titles)." CLAUDE.md wins over the style guide's looser "bold or italic to highlight key phrases". The same word is italicized two paragraphs later — Every other bold in the PR is a genuine UI element and reads correctly. 5. "context" in prose
CLAUDE.md: "Use 'entity', never 'context'." Suggest: "Define the 6. "now" as a temporal marker Style guide, Writing style: "Stay in the present tense. Never use 'currently', 'now', 'in the future', 'latest'." Five instances:
Each sentence reads fine with "now" deleted. 7. Article before "Console"
Style guide, Snowplow terminology: "Console: Capitalized, no article." Suggest: "You can also define these in Console." Every other Console reference in the PR is correct. 8. "easy" is on the banned list
Style guide: "Never use marketing language: remove 'effortlessly', 'easily', 'quickly'…". Suggest: "a service that bundles the group so you can retrieve all of the attributes in one call." 9. Six H2 sections on Install the SDKs / Create the schemas / Use a UUID for the account ID / Initialize the tracker / Track team activity / Troubleshooting. CLAUDE.md: "Limit pages to 3-5 H2 sections." Folding "Install the SDKs" into the page intro, or "Use a UUID for the account ID" into "Create the schemas", brings it in line. The other pages are all at five or fewer. 10. Sentence fragments introducing lists
Style guide: "Introduce lists with a sentence ending in a colon" — these have no verb. Suggest "The Nits11. Stacked admonitions at the end of 12. Unlinked cross-reference — 13. Code identifiers as SEO keywords — 14. Question-form admonition title — |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
documentation | 664fbff | Commit Preview URL Branch Preview URL |
Jul 31 2026, 10:14 AM |
Addresses the blockers, confusions, gaps, and nits raised in the newcomer-persona review of this tutorial. Blockers: - Python prerequisite corrected to 3.11+; every published snowplow-signals release declares >=3.11,<4.0, so the first install command failed on 3.9 and 3.10 with an error that never mentions Python. - Page 2 now spells out the draft, development, and production states a data structure moves through, and that migrating to production is Admin-only. - New "Confirm your events arrived" step: the tracker logs nothing for a non-2xx response and flush() never raises, so the page wires up EmitterConfiguration(on_failure=...) and points at Monitoring > Collection volumes and Monitoring > Data quality. - The AttributeKey snippet is restated on page 4 outside the tabs, so Console-tab readers aren't left with an undefined name. - The tracker block prints account_id, and the introduction says to run the snippets in one session. Confusions and gaps: real credential handling via environment variables, try/except/finally around the final subscription.get(), consistent .get() access with the empty-profile shape explained, rationale for counting domain_userid, corrected publish-ordering wording (the SDK publishes by type, so list order is irrelevant), a bare InterventionCriterion instead of a single-element Any wrapper, backfill and credential-hygiene notes, measured waits for the data catalog and config apply, a genuine expected output block for the full script, and a teardown section in the conclusion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Prose and conventions only; no code blocks changed. - Add lead-in sentences to the three Troubleshooting sections and to the conclusion's Next steps, so no heading opens straight into a list. - Capitalize list items and drop trailing periods from single-sentence ones, consistently across all six pages. - Correct admonition types: the connection-mistakes box is a tip, the fire-once and subscription-start boxes are notes. The draft/development box stays a warning, since stopping there turns events into failed events. - Fold "Install the SDKs" into the page intro, bringing the tracking page back within the three-to-five H2 limit. - Drop temporal "now" and "latest", the bold on "account", "in the Console UI", "for easy retrieval", and "as context" for entities. - Introduce lists with complete sentences, fold the stacked warehouse note on page 3 into prose, restate the attribute-key link on page 4, and replace symbol names in keywords with phrase-style ones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed two commits addressing both review tracks:
Two review findings were confirmed as bugs in other docs pages and deliberately not fixed here: the attribute-keys page's Console tab (name/owner fields that don't exist) and the interventions page typing 🤖 Generated with Claude Code |
Published tutorials shouldn't carry the Console/API errors or the run timings from our own verification passes. Sweep all six pages: - Drop troubleshooting entries that only existed because verification hit an error: the 400 on updating a published attribute group, the background-thread subscription failure narrative, and the raw 422/400/ TypeError/ValueError/httpx/KeyError strings. - Restate the surviving constraints positively: publish the attribute key in the same publish() call as the group, intervention subscriptions require UUID identifiers, one tracker per namespace per session. - Remove measured timings (catalog refresh, publish propagation, failed event reporting) and describe the waits qualitatively instead. - Simplify the cleanup section to the working instruction without the ordering bug narration; delete() handles dependency order itself. The "Confirm your events arrived" section, the on_failure emitter example, the draft/development/production data structure steps, and the try/except queue.Empty guard all stay. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The customer-facing sweep removed the troubleshooting entry that carried this constraint along with its status code, leaving nothing to tell a reader iterating on attribute definitions why republishing won't work. Restate it as guidance in the publish section, matching how the interventions tutorial and the agentic contexts docs phrase it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed 🤖 Generated with Claude Code |
Shift the tutorial toward a positive, Console-and-Assistant-first voice with less process ceremony. Suggest the Snowplow Assistant as the route for creating the two data structures, the attribute group, and the service, each with a copy/paste prompt. The attribute group and service now use the same Tabs pattern as the attribute key, with Console as the default tab, so the Console reader has a path through the whole definition set. Move OWNER into the shared connect block, since the intervention on the next page needs it whichever tab the reader picked, and offer an Assistant teardown alongside the Python cleanup. Replace "Confirm your events arrived" with a short verification step: check event volume and failed events in Console, or ask the Assistant. Drop the tracker failure-mode taxonomy and the on_failure callback, keeping a brief pointer that the emitter accepts delivery callbacks. Remove the timing estimate, the admin-gated Console access paragraph, the draft/development/production walkthrough and its stop-at-draft warning, the track-first-so-the-catalog-populates rationale, the publish propagation paragraph, and four info panels the owner flagged as noise. Make the pages self-contained by dropping the references to the Python tracking tutorial. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Pushed
🤖 Generated with Claude Code |
What changed?
New tutorial
tutorials/signals-account-attributes/(6 pages + 2 live Console screenshots): track a B2B account entity, define a customaccount_idattribute key (Console and SDK tabs), compute cross-user account attributes, and retrieve them with a rule intervention.Why?
Fills the account-level/custom-attribute-key gap in Signals tutorial coverage (tutorials gap analysis). Existing tutorials only cover the built-in session/user keys.
Reviewer guidance
python-tracking-and-signalstutorial overstates this — fix proposed separately, not in this PR./docs/signals/attributes/warehouse-config/instead of the (unbuilt) warehouse-attributes tutorial; swap when that tutorial lands.🤖 Generated with Claude Code