Analytics: events, funnels, and release impact
Page views, custom events, sessions and funnels, with every event carrying the entry, revision and release it happened on. myna analytics impact compares equal windows either side of a release: per entry, per event, and the reports filed since.
Analytics
A project turns Analytics on from Settings → Products, or picks it when the project is created.
myna analytics overview --period 30d
myna analytics breakdown path --metric visitors
myna analytics funnel pricing_viewed signup_started signup_completed --within 24
myna analytics friction
Every command takes the same filters — --event, --path, --entry, --release, --property plan:pro — and --json. Windows are --period 7d or --from/--to.
funnel counts steps in order and --within runs from the visitor's first one. Pin a step to a page with event@/path.
friction returns the pages visits end on, the pages people arrive at and leave, and the pages that generate reports per thousand sessions.
Recording
npm install @myna-sh/sdk
import { createAnalytics } from "@myna-sh/sdk/analytics";
const analytics = createAnalytics({ ingestKey: "myna_ik_…", autoPageviews: true });
analytics.track("checkout_started", { plan: "pro", seats: 12 });
analytics.identify({ id: user.id, signature });
@myna-sh/sdk/analytics and @myna-sh/react/analytics are new subpaths; the React one exports AnalyticsProvider, useAnalytics, usePageview and useContentContext.
The key is the same publishable myna_ik_ key Feedback uses, bound to the project's registered origins, carrying analytics:track.
signature is HMAC-SHA256(identitySecret, id) from signIdentity in @myna-sh/sdk/feedback/server. Without it the visitor stays anonymous.
No session recording, no DOM reads, no fetch wrapping, no console patching, no click capture, no IP address, no raw User-Agent, no cookie. Query strings are dropped after the five UTM parameters.
Content
const page = await myna.entries.get("pages", "pricing");
analytics.setContent({ entry: page.id, collection: "pages", revision: page.revisionId });
Every event then carries the entry, the revision the visitor saw, and the release that shipped it.
myna analytics impact 48
impact compares equal windows either side of a release: overall, per entry it touched, per event name, and the reports filed since. A release published two days ago is compared over two days.
content ranks entries by traffic beside the reports filed from their pages. entry <ent_…> adds each publication in the window and the movement either side of it. person <your-user-id> returns one user's visits, events and reports together.
Retention
myna analytics settings --retention 30
myna analytics settings --exclude '/health' '/admin/**'
Excluded paths are refused at ingest. Free keeps 100,000 events a month for 90 days, Pro 5,000,000 for 365. Past the allowance ingest answers and stops recording, reporting what it dropped.
Agents
Ten tools on a project running Analytics: myna_analytics_overview, myna_analytics_breakdown, myna_analytics_events, myna_analytics_funnel, myna_analytics_friction, myna_analytics_content, myna_analytics_entry, myna_analytics_release_impact, myna_analytics_person, myna_describe_analytics_event.
Event names register on arrival, and the catalog carries what each one means.
myna analytics describe checkout_started \
"Fires on the Start checkout click, before a plan is chosen."
Products
myna projects create --name "Marketing site" --products content,analytics
The dashboard asks the same question. Omit the choice and a project gets Content. A project turns any product off, down to the last one.
Upgrading
timezone is gone from project create, update, and read. Scheduled publishing stores an exact instant and is unaffected. Drop the field from any call that sends it.
An entry gets a slug when its collection declares a field.slug() or a path. A collection with neither stores slug: null and addresses entries by id, and naming a slug for one is refused. Existing entries keep their slugs.
myna billing status reports every metered thing, including reports received and report attachments.
API_VERSION is unchanged. myna doctor reports the new analytics* entries in API_CAPABILITIES.
Affects sdk · react · cli · mcp · api · dashboard · docs
