Page MenuHomePhabricator

Design information architecture for Metrics Platform docs
Closed, ResolvedPublic

Description

Status: Open for feedback

Following initial updates and research into the Metrics Platform docs, design a cohesive information architecture that meets users' information needs and includes spaces for future features.


Approach

The Metrics Platform is a rapidly evolving set of tools, workflows, and conventions. Because of this high rate of change, the approach to the documentation must also be incremental. This task summarizes how this approach has affected the design of the information architecture and my proposal for the information architecture going forward.

Prior to the MPIC alpha release, the process for creating a Metrics Platform instrument used only code and config changes, without any UI assistance. Because of this code-focused process, the docs were the primary entry point for users creating instruments, and the initial goal of this docs project was to support this workflow.

This pre-MPIC information architecture centered on a primary guide to creating an instrument, with supporting documents branching off it, as shown in the documentation user journey diagram from T370335:

MP docs flow.jpg (1×2 px, 226 KB)

In September 2024, the Growth team used the updated docs to create an instrument. Growth engineer Sergio Gimeno Saldaña stated that the docs were very helpful and that Growth was able to set up their instrument without asking Data Products questions about documented functionality. This means that the pre-MPIC docs were able to successfully accomplish their goal.

However, as the development of the Metrics Platform progresses, the information architecture of the docs needs to evolve. The purpose of MPIC is to provide an abstraction layer over the instrument-creation process to create a better experience for users. As such, MPIC will replace the docs as the entry point for users creating instruments. To adapt to this change in the platform, the information architecture of the docs should shift from focusing on the docs as the primary entry point to focusing how the docs can support MPIC. Specifically, this means designing the docs around places where MPIC will need "Learn more" links.

NOTE: To simplify this writeup, I'm using "MPIC" to refer to MPIC, Growthbook, or any other future Metrics Platform UI. I'm also using "instrument" as a placeholder for baseline instruments, experiments, A/B tests, and any other entities that will be supported by Metrics Platform.

Post-MPIC, the goals of the Metrics Platform documentation will be to:

  • provide supporting documentation for users of MPIC, allowing those users to independently create instrumentation without direct support from Data Products teams, except in edge cases
  • provides places to document the functionality of the system as it evolves, so that both system users and maintainers can understand current capabilities

To support this, I've designed an information architecture that:

  • is modular enough to be integrated with future UI experiences
  • reduces complexity by using minimal levels of subpaging

Note that the information architecture below a work-in-progress based on my current understanding of the capabilities of the system. It will likely need to evolve as new capabilities are added to the platform.

Navigation

This section shows what users will be shown on the Metrics Platform homepage on Wikitech.

Guides

  • Measure product health (directs users to MPIC/other UI)
  • Conduct an experiment (directs users to MPIC/other UI)
  • Local development setup
  • Data collection guidelines (link to Foundation Wiki)

Templates

  • Measurement plan
  • Instrumentation spec
  • Experimentation scorecard

API docs

  • JavaScript
  • PHP
  • Java
  • Swift

Reference

Maintainer docs

  • Getting started
  • Deploy a new client library version
  • Validate events
  • Administration
  • Decision records
    • Deprioritize Custom Data
    • Single Table Per Base Schema

Contributing
Glossary
About

Rationale

With MPIC taking the place of the docs as the main entry point for users of Metrics Platform, this information architecture focuses on:

  • API docs for engineers integrating with Metrics Platform clients
  • docs to support MPIC flows, such as templates and reference docs, for users of MPIC

The schema pages and contextual attributes page will be separate so they can be linked to from different sections in the MPIC forms, but these pages will also share content via transclusion to avoid duplication. For example, a list of contextual attributes supported by the JavaScript client could be transcluded into both the Contextual attributes and App base schema pages.

Overall, this information architecture proposes an approach that can evolve alongside the platform more so than a finalized set of pages.

Data contract docs

To document the data contract, I propose a page for each of the base schemas that lists the available properties by type (interaction data, contextual attributes, or core properties), but does not duplicate the property types or descriptions from the schema definitions. To make the property types and descriptions from the schemas easy to read, I propose creating a bot that, on a regular cadence, pulls the schema definition from schema.wikimedia.org, converts it to JSON, and publishes it to a wiki page. MediaWiki will render the resulting page as a single, full-page table. Based on my research, this is the simplest way to deliver a readability improvement. Update: In T372680, Dan recommended moving forward with rendering human-friendly version of the schemas on schema.wikimedia.org instead of using a bot. See T376841: Render human-readable schemas on schema.wikimedia.org.

Examples:

Product user flows from @VirginiaPoundstone

  • User flow #1 goal: measure product health metrics
    • Configure instrumentation to start collecting data via MPIC UI > use client libraries to add instrument code based on measurement plan > monitor instrument landing page (via MPIC catalog)
  • User flow #2 goal: conduct a controlled experiment
    • Configure experiment instrumentation to start collecting data on select percentages of traffic on select wikis via MPIC UI > use client libraries to add instrumentation based on experimentation scorecard > monitor experiment progress on its landing page (via MPIC catalog)

Page list (WIP)

Metrics Platform/About
Metrics Platform/Analytical sampling
Metrics Platform/API (disambiguation)
Metrics Platform/App schema
Metrics Platform/Conduct an experiment
Metrics Platform/Contextual attributes
Metrics Platform/Contextual attributes/Java (transcluded)
Metrics Platform/Contextual attributes/JavaScript (transcluded)
Metrics Platform/Contextual attributes/PHP (transcluded)
Metrics Platform/Contextual attributes/Swift (transcluded)
Metrics Platform/Contributing
Metrics Platform/Core properties (transcluded)
Metrics Platform/Glossary
Metrics Platform/Interaction data (transcluded)
Metrics Platform/JavaScript API
Metrics Platform/Java API
Metrics Platform/Measure product health
Metrics Platform/PHP API
Metrics Platform/Sampling
Metrics Platform/Swift API
Metrics Platform/Schemas (disambiguation)
Metrics Platform/Web schema

Event Timeline

apaskulin updated the task description. (Show Details)
apaskulin updated the task description. (Show Details)
apaskulin added a subscriber: VirginiaPoundstone.

@VirginiaPoundstone Please read through the task description and let me know what you think about this approach to the docs for the remainder of the docs project! Feedback is also welcome from anyone on the team

Wow, @apaskulin, this is really clarify, well done, and helpful. I deeply appreciate the flexibility for change and growth in the platform as part of how you have defined the information architecture.

Clarification:

MPIC will replace the docs as the entry point for users creating instruments

Not sure this is not exactly right. Engineers will still need to add instrumentation to their code, @phuedx are the APIs all developers need to add instrumentation?

Some thoughts:

  • Looking at the emergent product analytics glossary, I'm thinking about "create an instrument" vs measuring product health metrics (PHI). When conducting experiments, the PHI are the secondary and guardrail metrics that are monitored for unintended impacts beyond the primary metric. Because we haven't yet really landed what we mean when we say "instrument" and each team has a bespoke way of measuring PHI, this might be an opportunity to create a standard approach... but maybe it is too soon? CC @Sarai-WMF @mpopov in case they have feedback / thoughts about this.
    • user flow #1 goal: measure product health metrics
      • use client libraries to add instrument code based on measurement plan > configure instrumentation to start collecting data via MPIC UI > monitor instrument landing page (via MPIC catalog)
    • user flow #2 goal: conduct a controlled experiment
      • use client libraries to add instrumentation based on experimentation scorecard > configure experiment instrumentation to start collecting data on select percentages of traffic on select wikis via MPIC UI > monitor experiment progress on its landing page (via MPIC catalog)
  • In the templates section we say "measurement plan" but I think we need to disambiguate between a "product health metrics measurement plan" and an "experiment scorecard" T374981: Create a draft Experimentation Scorecard CC @mpopov and @nettrom_WMF for their thoughts.

schema pages and contextual attributes page will be separate so they can be linked to from different sections in the MPIC forms

Nice! The sandbox page is a great way to make the yaml files. much easier to parse. I also appreciate the at a glance review of the the expectations and understanding of the data types similar to https://schema.org/Dataset. I especially like that the design allows us the ability to link to the relevant parts from MPIC and stay synced with the code. <3 CC @phuedx
for review.

Thanks for this awesome feedback, @VirginiaPoundstone!

Not sure this is not exactly right. Engineers will still need to add instrumentation to their code, @phuedx are the APIs all developers need to add instrumentation?

That's correct, engineers will still need to instrument their code. By "entry point", I meant that an ideal "information experience" for MPIC will be one where users can complete as much of their task as possible without leaving the site. So instead of having the process for creating an experiment in a Google Doc or wiki page, the steps would be integrated into the MPIC flow. In the short term while things are in development, we may still rely on the docs to help people get started, but our eventual goal would be to replace the "guide to measuring product health" and the "guide to conducting an experiment" with a link to MPIC. Does this align with the way you've been thinking about the tool? Sarai and I discussed this briefly a few weeks ago, but @Sarai-WMF please correct me if this isn't aligned with your thinking.

user flow #1 goal: measure product health metrics
user flow #2 goal: conduct a controlled experiment

These two flows make a lot of sense to me! I've updated the task description to include these.

I'd like to confirm that we want users to merge their instrumentation code before they fill out an MPIC form. In the non-MPIC flow, users merge their instrument code after deploying their stream config to avoid errors from trying to publish events to a nonexistent stream. Maybe this is no longer an issue because of how MPIC works?

I think we need to disambiguate between a "product health metrics measurement plan" and an "experiment scorecard"

Nice work on the scorecard! I added it to the task description.

The "measurement plan" comes from the Record of Data Collection Activity form and has become a pattern with recent instrumentation projects. I understood the intention of the measurement plan to be to document enough information about the proposed data collection in order to start an L3SC review if necessary. I think the measurement plan template could work for both product health metrics and experiments with a few adjustments. Then we could link to it in the scorecard for "Product Manager finalizes experimentation plan". Alternatively, we could create two separate templates: a product health measurement plan template and an experimentation plan template. I'm open to both options.

The sandbox page is a great way to make the yaml files. much easier to parse.

I've updated the task description with an update on this: Per Dan's feedback in T372680, he thinks it would be easier to add rendering of human-friendly versions of the schemas to schema.wikimedia.org directly instead of using a bot. If this works out, this would be even better than a bot! Feedback and ideas are welcome on T376841: Render human-readable schemas on schema.wikimedia.org.

eventual goal would be to replace the "guide to measuring product health" and the "guide to conducting an experiment" with a link to MPIC. Does this align with the way you've been thinking about the tool?

Understood. Yes, ideally, if we continue to custom build, this will be the goal once mature.

I'd like to confirm that we want users to merge their instrumentation code before they fill out an MPIC form. In the non-MPIC flow, users merge their instrument code after deploying their stream config to avoid errors from trying to publish events to a nonexistent stream. Maybe this is no longer an issue because of how MPIC works?

@cjming and @Sfaci can you confirm?

Then we could link to it in the scorecard for "Product Manager finalizes experimentation plan".

Let's start with this streamlined path and see if needs adjustment later.

Thanks, @VirginiaPoundstone! I'll update the task accordingly. Unassigning you since your review is complete

I'd like to confirm that we want users to merge their instrumentation code before they fill out an MPIC form. In the non-MPIC flow, users merge their instrument code after deploying their stream config to avoid errors from trying to publish events to a nonexistent stream. Maybe this is no longer an issue because of how MPIC works?

@VirginiaPoundstone
Precisely @apaskulin and I ended up talking about this yesterday, but, just in case I'm going to put it here as well:
I would say the flow should be same. In the end MPIC is just a tool to configure the instrument (the stream mainly) and save that information somewhere. Somehow we could consider MPIC as a replacement for the configuration manual step we are doing currently. Users will have to deploy their instrument code anyway. It wouldn't make sense to run an instrument without having deployed their stream configuration.

apaskulin claimed this task.

Thanks, @Sfaci! I've updated the user flows to have users write their instrument code before using MPIC.

I'm resolving this task for now, but feel free to continue to add feedback here. I'll be opening a separate task to move the IA onto a wiki page.

(oops, I forgot we don't resolve these right away)

I'd like to confirm that we want users to merge their instrumentation code before they fill out an MPIC form. In the non-MPIC flow, users merge their instrument code after deploying their stream config to avoid errors from trying to publish events to a nonexistent stream. Maybe this is no longer an issue because of how MPIC works?

@cjming and @Sfaci can you confirm?

Sorry to jump in but I don't think your question has been answered @apaskulin / @VirginiaPoundstone:

The Event Platform Client (and Metrics Platform Client, by extension) will silently drop events that are submitted to streams that don't exist. A stream can exist without an instrument and vice versa.

The Event Platform Client (and Metrics Platform Client, by extension) will silently drop events that are submitted to streams that don't exist. A stream can exist without an instrument and vice versa.

This is good to know! @VirginiaPoundstone, it looks like we can have users write their instrument code either before or after using MPIC, depending on the product experience you prefer. From a docs/UI perspective, the difference will be whether we direct users to write their instrument code at the beginning or end of the MPIC form.

For now, they should use the docs and write their instrument code before going to MPIC.

In the future, if we expand MPIC to include the pre-test checklist steps, this could change.

Great! The workflow docs match that flow.