@escape-game-over/atlas 0.1.64 → 0.1.65
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/package.json +1 -1
- package/src/analytics/umami.ts +12 -3
package/package.json
CHANGED
package/src/analytics/umami.ts
CHANGED
|
@@ -36,7 +36,16 @@ export interface UmamiTracker {
|
|
|
36
36
|
readonly performance?: boolean;
|
|
37
37
|
/** Leave `?query` out of recorded URLs. */
|
|
38
38
|
readonly excludeSearch?: boolean;
|
|
39
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Leave `#hash` out of recorded URLs. **Defaults to on here.**
|
|
41
|
+
*
|
|
42
|
+
* Umami's own default is off, and the tracker counts a pageview whenever
|
|
43
|
+
* the URL it compares changes. So anything on the page that rewrites the
|
|
44
|
+
* fragment (a gallery, a tab, an anchor link) is recorded as another visit
|
|
45
|
+
* to a page nobody left.
|
|
46
|
+
*
|
|
47
|
+
* `false` turns it off, and writes the word rather than omitting it.
|
|
48
|
+
*/
|
|
40
49
|
readonly excludeHash?: boolean;
|
|
41
50
|
/** Honour the browser's Do Not Track setting. */
|
|
42
51
|
readonly doNotTrack?: boolean;
|
|
@@ -267,15 +276,15 @@ export function umamiScripts(
|
|
|
267
276
|
src: at(umami.tracker?.path ?? "/script.js"),
|
|
268
277
|
attrs: stated({
|
|
269
278
|
...common,
|
|
270
|
-
// The
|
|
279
|
+
// The two defaults lib overrides — see `UmamiTracker`. The
|
|
271
280
|
// others are left to Umami: `auto-track` and `auto-pageview`
|
|
272
281
|
// are already on unless the word `false` appears, so stating
|
|
273
282
|
// them would be bytes that change nothing, and whether to
|
|
274
283
|
// honour Do Not Track or drop query strings is a decision about
|
|
275
284
|
// this business rather than about this kind of site.
|
|
276
285
|
"data-performance": flag(umami.tracker?.performance ?? true),
|
|
286
|
+
"data-exclude-hash": flag(umami.tracker?.excludeHash ?? true),
|
|
277
287
|
"data-exclude-search": flag(umami.tracker?.excludeSearch),
|
|
278
|
-
"data-exclude-hash": flag(umami.tracker?.excludeHash),
|
|
279
288
|
"data-do-not-track": flag(umami.tracker?.doNotTrack),
|
|
280
289
|
"data-auto-track": flag(umami.tracker?.autoTrack),
|
|
281
290
|
"data-auto-pageview": flag(umami.tracker?.autoPageview),
|