From 12adfbc8fe2d5be112f5343481dbe76c2577dba4 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 5 Jun 2023 17:58:46 +0200 Subject: [PATCH] Document changes and new `navigate` event semantics Signed-off-by: Eric Peterson --- .changeset/analytics-gather-defer.md | 6 ++++++ docs/plugins/analytics.md | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .changeset/analytics-gather-defer.md diff --git a/.changeset/analytics-gather-defer.md b/.changeset/analytics-gather-defer.md new file mode 100644 index 0000000000..7b30f0b655 --- /dev/null +++ b/.changeset/analytics-gather-defer.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-app-api': patch +'@backstage/core-plugin-api': patch +--- + +Fixed a bug that prevented accurate plugin and route data from being applied to `navigate` analytics events when users visited pages constructed with ``, ``, and similar components that are used to gather one or more routable extensions under a given path. diff --git a/docs/plugins/analytics.md b/docs/plugins/analytics.md index fa9aed7fe5..c218a99d18 100644 --- a/docs/plugins/analytics.md +++ b/docs/plugins/analytics.md @@ -52,13 +52,13 @@ learn how to contribute the integration yourself! The following table summarizes events that, depending on the plugins you have installed, may be captured. -| Action | Subject | Other Notes | -| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `navigate` | The URL of the page that was navigated to. | The parameters of the current route will be included as attributes | -| `click` | The text of the link that was clicked on. | The `to` attribute represents the URL clicked to. | -| `create` | The `name` of the software being created; if no `name` property is requested by the given Software Template, then the string `new {templateName}` is used instead. | The context holds an `entityRef`, set to the template's ref (e.g. `template:default/template-name`). | -| `search` | The search term entered in any search bar component. | The context holds `searchTypes`, representing `types` constraining the search. The `value` represents the total number of search results for the query. This may not be visible if the permission framework is being used. | -| `discover` | The title of the search result that was clicked on | The `value` is the result rank. A `to` attribute is also provided. | +| Action | Subject | Other Notes | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `navigate` | The URL of the page that was navigated to. | Fired immediately when route location changes (unless associated plugin/route data is ambiguous, in which case the event is fired after plugin/route data becomes known, immediately before the next event or document unload). The parameters of the current route will be included as attributes. | +| `click` | The text of the link that was clicked on. | The `to` attribute represents the URL clicked to. | +| `create` | The `name` of the software being created; if no `name` property is requested by the given Software Template, then the string `new {templateName}` is used instead. | The context holds an `entityRef`, set to the template's ref (e.g. `template:default/template-name`). | +| `search` | The search term entered in any search bar component. | The context holds `searchTypes`, representing `types` constraining the search. The `value` represents the total number of search results for the query. This may not be visible if the permission framework is being used. | +| `discover` | The title of the search result that was clicked on | The `value` is the result rank. A `to` attribute is also provided. | If there is an event you'd like to see captured, please [open an issue](https://github.com/backstage/backstage/issues/new?assignees=&labels=enhancement&template=feature_template.md&title=[Analytics%20Event]:%20THE+EVENT+TO+CAPTURE) describing the event you want to see and the questions it