@vskstudio/takt-astro 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -48,6 +48,7 @@ Both the integration and the component accept the same options:
|
|
|
48
48
|
| `scriptOrigin` | `string` | – | First-party origin to derive the endpoint from (`{origin}/api/event`) — your Takt domain or a custom domain to dodge ad-blockers (endpoint wins over it). |
|
|
49
49
|
| `outbound` | `boolean` | `false` | Auto-track outbound link clicks. |
|
|
50
50
|
| `files` | `boolean` | `false` | Auto-track file downloads. |
|
|
51
|
+
| `track404` | `boolean` | `false` | Report a `404` event when the page is an error page (`[data-takt-404]` / `<meta name="takt:404">` marker, or a 404 HTTP status). |
|
|
51
52
|
| `spa` | `boolean` | `true` | Track client-side navigations. |
|
|
52
53
|
| `respectDnt` | `boolean` | `true` | Suppress events when Do Not Track is on. |
|
|
53
54
|
| `excludeLocalhost` | `boolean` | `true` | Suppress events on localhost / private IPs. |
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,11 @@ interface TaktOptions {
|
|
|
20
20
|
outbound?: boolean;
|
|
21
21
|
/** Auto-track file downloads. */
|
|
22
22
|
files?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Report a `404` event when the page is an error page (`[data-takt-404]` /
|
|
25
|
+
* `<meta name="takt:404">` marker, or a 404 HTTP status).
|
|
26
|
+
*/
|
|
27
|
+
track404?: boolean;
|
|
23
28
|
/** Track client-side navigations (history + Astro View Transitions). Default `true`. */
|
|
24
29
|
spa?: boolean;
|
|
25
30
|
/** Suppress events when the browser's Do Not Track is enabled. Default `true`. */
|
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ function resolveOptions(options = {}) {
|
|
|
6
6
|
scriptOrigin: options.scriptOrigin,
|
|
7
7
|
outbound: options.outbound ?? false,
|
|
8
8
|
files: options.files ?? false,
|
|
9
|
+
notFound: options.track404 ?? false,
|
|
9
10
|
respectDnt: options.respectDnt ?? true,
|
|
10
11
|
excludeLocalhost: options.excludeLocalhost ?? true,
|
|
11
12
|
auto: options.spa ?? true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vskstudio/takt-astro",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Astro integration for Takt privacy-friendly analytics",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "VSK Studio",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"release": "pnpm build && changeset publish"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@vskstudio/takt-core": ">=0.4.
|
|
59
|
+
"@vskstudio/takt-core": ">=0.4.2",
|
|
60
60
|
"astro": ">=4"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@changesets/cli": "^2.31.0",
|
|
64
64
|
"@playwright/test": "^1.50.0",
|
|
65
65
|
"@size-limit/preset-small-lib": "^11.1.6",
|
|
66
|
-
"@vskstudio/takt-core": "^0.4.
|
|
66
|
+
"@vskstudio/takt-core": "^0.4.2",
|
|
67
67
|
"astro": "^5.0.0",
|
|
68
68
|
"eslint": "^9.0.0",
|
|
69
69
|
"size-limit": "^11.1.6",
|