@djangocfg/analytics 2.1.541 → 2.1.543
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 +4 -4
- package/src/events.ts +12 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/analytics",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.543",
|
|
4
4
|
"description": "First-party analytics for django-cfg apps: one route listener, N transports (self-hosted + GA4). Pageviews, sessions, and authenticated-user attribution.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"django",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"next": ">=15.0.0",
|
|
53
|
-
"react": "^19.
|
|
54
|
-
"react-dom": "^19.
|
|
53
|
+
"react": "^19.0.0",
|
|
54
|
+
"react-dom": "^19.0.0",
|
|
55
55
|
"react-ga4": "^2.1.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
66
|
+
"@djangocfg/typescript-config": "^2.1.543",
|
|
67
67
|
"@types/node": "^25.9.5",
|
|
68
68
|
"@types/react": "19.2.15",
|
|
69
69
|
"next": "^15.5.9",
|
package/src/events.ts
CHANGED
|
@@ -61,7 +61,18 @@ export type AnalyticsCategoryType = typeof AnalyticsCategory[keyof typeof Analyt
|
|
|
61
61
|
export type AnalyticsEventType = typeof AnalyticsEvent[keyof typeof AnalyticsEvent];
|
|
62
62
|
|
|
63
63
|
export type AnalyticsPropertyValue = string | number | boolean | null;
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* `| undefined` in the value: an optional dimension the caller did not supply
|
|
67
|
+
* arrives as an explicit `undefined`, and every transport already drops it
|
|
68
|
+
* (JSON.stringify omits it, GA4 ignores it). Without it, the identical sink
|
|
69
|
+
* contract in `@djangocfg/api` — the auth events' only route into this package
|
|
70
|
+
* — does not type-check against it.
|
|
71
|
+
*/
|
|
72
|
+
export type AnalyticsEventProperties = Record<
|
|
73
|
+
string,
|
|
74
|
+
AnalyticsPropertyValue | undefined
|
|
75
|
+
>;
|
|
65
76
|
|
|
66
77
|
/**
|
|
67
78
|
* Framework event names with their valid payloads.
|