Skip to content

Commit a907ad7

Browse files
authored
docs: insights gotcha (#8009)
1 parent 95ac341 commit a907ad7

File tree

1 file changed

+7
-9
lines changed
  • packages/docs/src/routes/docs/labs/insights

1 file changed

+7
-9
lines changed

packages/docs/src/routes/docs/labs/insights/index.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ contributors:
55
- gioboa
66
- mrhoodz
77
- thejackshelton
8-
updated_at: '2023-10-11T22:12:12Z'
8+
- maiieul
9+
updated_at: '2025-09-29T22:12:12Z'
910
created_at: '2023-06-22T22:13:24Z'
1011
---
1112

@@ -19,16 +20,12 @@ Insights allow your application to collect real user usage information to optimi
1920
## Architecture
2021

2122
The optimization consists of these parts:
22-
- A `<Insights>` component which collects real user usage data.
23+
- A `<Insights>` component which collects time based bundle execution data.
24+
- A `qwikInsights` Vite Plugin to apply the usage data during the build process.
2325
- A registered application inside the builder.io database.
24-
- A `qwikInsights` Vite Plugin to load and save real user usage data during the build process.
2526

26-
> NOTE:
27-
> To try this new feature please drop a message inside the [Qwik Discord server](https://qwik.dev/chat)
2827
> Currently Insights info is hosted in the Builder database. This information is about the execution of symbols/chunks in the application.
2928
> The implementation of the service is open-source and you have the choice to use ours or host your own.
30-
> (Please note, that this may become a paid service in the future.)
31-
3229
3330
## `<Insights>` component
3431

@@ -63,9 +60,10 @@ The `<Insights>` component collects this data:
6360
- The `pathname` part of the URL.
6461
- Random sessionID which identifies which symbol loads came from the same browser session.
6562

66-
NOTE: The `<Insights>` component does not collect any user-identifiable information.
63+
> The `<Insights>` component does not collect any user-identifiable information.
64+
65+
The data collected being based on the frequency bundles are being grouped together at the same time, it is **not** advised to share the same API key between your preview and production environments. During preview, developers might use the application in 3G throttling and click around, which can put unrelated bundles together. After that the import graph would be wrong, leading to over-preloading, and Insights would then base its future data collection based on those corrupted bundles. If that happened to you, we recommend creating a new API key for your production environment. In normal usage, you will release a new version of your application and there will be a long enough window for Insights to collect the data. In case you face over-preloading in your app, you can always re-create a new API key. Drop us a message in the [Qwik Discord server](https://qwik.dev/chat) if this becomes a recurrent issue for you.
6766

68-
The information collected is sent to builder.io database for storage.
6967

7068
## Vite integration
7169

0 commit comments

Comments
 (0)