From 95367203bf31f59d36d7571ba50fe5416370bcf2 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 29 Dec 2024 19:15:21 -0600 Subject: [PATCH] cleanup --- packages/analytics/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/analytics/README.md b/packages/analytics/README.md index 14f52ad1..71e67972 100644 --- a/packages/analytics/README.md +++ b/packages/analytics/README.md @@ -48,6 +48,17 @@ await analytics.identify('some-user-id'); analytics.autoTrack(document.body); ``` +Finally, you must import the `#analytics` module in your background: + +```ts +// entrypoints/background.ts +import '#analytics'; +``` + +This is because the `analytics` object sends events and other data to the background for it perform the HTTP request to upload the data. + +This also means to view the network requests in devtools, you must look at the background's devtools. + ## Providers ### Google Analytics 4 (Measurement Protocol)