You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install the [client-side library](https://www.npmjs.com/package/serverless-website-analytics-client):
@@ -190,8 +197,9 @@ Irrelevant of the framework, you have to do the following to track page views on
190
197
site's `Origin` is whitelisted in the backend config.
191
198
2. On each route change call the `analyticsPageChange` function with the name of the new page.
192
199
193
-
The following sections show you how to do it in Vue, see [the readme of the client](https://github.com/rehanvdm/serverless-website-analytics-client#usage)
194
-
for React and Svelte usage, but again the SDK allows for usage in **ANY framework**.
200
+
> [!IMPORTANT]
201
+
> The `serverless-website-analytics` can be used in **ANY framework**. To demonstrate this, find examples for Svelte and React in the
@@ -286,7 +295,8 @@ There are three available authentication configurations:
286
295
287
296
Similarly to the backend, it is also a TS Lambda-lith that is hit through the FURL by reverse proxying through CloudFront.
288
297
It also uses [tRPC](https://trpc.io/) but uses the [trpc-openapi](https://github.com/jlalmes/trpc-openapi) package to
289
-
generate an OpenAPI spec. This is used to generate the API types used in the [client JS package](https://www.npmjs.com/package/serverless-website-analytics-client).
298
+
generate an [OpenAPI spec](https://github.com/rehanvdm/serverless-website-analytics-client/blob/master/package/src/OpenAPI-Ingest.yaml).
299
+
This is used to generate the API types used in the [client JS package](https://www.npmjs.com/package/serverless-website-analytics-client).
290
300
and can also be used to generate other language client libraries.
291
301
292
302
The lambda function then saves the data to S3 through a Kinesis Firehose. The Firehose is configured to save the data
@@ -296,6 +306,83 @@ the date will be stored after about 1min ± 1min.
296
306
Location data is obtained by looking the IP address up in the [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/) database.
297
307
We don't store any Personally Identifiable Information (PII) in the logs or S3, the IP address is never stored.
298
308
309
+
### Querying data manually
310
+
311
+
You can query the data manually using Athena. The data is partitioned by site and date. There are two tables,
312
+
one for the page views (`page_views`) and another for the tracking data(`events`).
Install the [client-side library](https://www.npmjs.com/package/serverless-website-analytics-client):
@@ -190,8 +197,9 @@ Irrelevant of the framework, you have to do the following to track page views on
190
197
site's `Origin` is whitelisted in the backend config.
191
198
2. On each route change call the `analyticsPageChange` function with the name of the new page.
192
199
193
-
The following sections show you how to do it in Vue, see [the readme of the client](https://github.com/rehanvdm/serverless-website-analytics-client#usage)
194
-
for React and Svelte usage, but again the SDK allows for usage in **ANY framework**.
200
+
> [!IMPORTANT]
201
+
> The `serverless-website-analytics` can be used in **ANY framework**. To demonstrate this, find examples for Svelte and React in the
@@ -286,7 +295,8 @@ There are three available authentication configurations:
286
295
287
296
Similarly to the backend, it is also a TS Lambda-lith that is hit through the FURL by reverse proxying through CloudFront.
288
297
It also uses [tRPC](https://trpc.io/) but uses the [trpc-openapi](https://github.com/jlalmes/trpc-openapi) package to
289
-
generate an OpenAPI spec. This is used to generate the API types used in the [client JS package](https://www.npmjs.com/package/serverless-website-analytics-client).
298
+
generate an [OpenAPI spec](https://github.com/rehanvdm/serverless-website-analytics-client/blob/master/package/src/OpenAPI-Ingest.yaml).
299
+
This is used to generate the API types used in the [client JS package](https://www.npmjs.com/package/serverless-website-analytics-client).
290
300
and can also be used to generate other language client libraries.
291
301
292
302
The lambda function then saves the data to S3 through a Kinesis Firehose. The Firehose is configured to save the data
@@ -296,6 +306,83 @@ the date will be stored after about 1min ± 1min.
296
306
Location data is obtained by looking the IP address up in the [MaxMind GeoLite2](https://dev.maxmind.com/geoip/geoip2/geolite2/) database.
297
307
We don't store any Personally Identifiable Information (PII) in the logs or S3, the IP address is never stored.
298
308
309
+
### Querying data manually
310
+
311
+
You can query the data manually using Athena. The data is partitioned by site and date. There are two tables,
312
+
one for the page views (`page_views`) and another for the tracking data(`events`).
0 commit comments