@reservamos/browser-analytics 1.1.2-alpha.0 → 1.1.3-alpha.0
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/CHANGELOG.md +5 -0
- package/README.md +35 -0
- package/dist/browser-analytics.cjs +3 -3
- package/dist/browser-analytics.cjs.map +1 -1
- package/dist/browser-analytics.d.ts +7 -0
- package/dist/browser-analytics.esm.js +50 -9
- package/dist/browser-analytics.esm.js.map +1 -1
- package/dist/browser-analytics.iife.js +3 -3
- package/dist/browser-analytics.iife.js.map +1 -1
- package/package.json +1 -1
- package/src/events/identify/identify.test.ts +102 -0
- package/src/events/identify/identify.ts +3 -0
- package/src/init.ts +4 -0
- package/src/services/config.test.ts +39 -0
- package/src/services/config.ts +16 -1
- package/src/services/geolocation.test.ts +8 -0
- package/src/services/geolocation.ts +29 -0
- package/src/services/validator/validator.test.ts +34 -1
- package/src/services/validator/validator.ts +5 -0
- package/src/track.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
- Add `latitude` and `longitude` to the `Geolocation Requested` event.
|
|
6
|
+
- Add `geolocation_source` to the `Geolocation Requested` event, user profile, and default event properties when browser coordinates are available. Currently set to `browser`.
|
|
7
|
+
|
|
3
8
|
## 1.1.1
|
|
4
9
|
|
|
5
10
|
- Register `Event Source` as a Mixpanel super property with fixed value `sdk` via `mixpanel.register()` on init, so all events tracked through the SDK include it.
|
package/README.md
CHANGED
|
@@ -44,6 +44,8 @@ window.addEventListener('Tracker Ready', () => {
|
|
|
44
44
|
});
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
+
`appName` is optional. When provided, it is sent as the `x-app-name` HTTP header on Datalake identify and anonymous-profile requests so the API can identify the originating client platform.
|
|
48
|
+
|
|
47
49
|
## Identifying Users
|
|
48
50
|
|
|
49
51
|
The `identify` method accepts a main identifier and an object containing user information. The object has four predefined fields: `email`, `firstName`, `lastName`, and `phone`. In addition to these, you can include any custom fields to store additional user-specific information as needed.
|
|
@@ -61,3 +63,36 @@ analytics.identify('main-identifier', {
|
|
|
61
63
|
salesforceId: '123456789',
|
|
62
64
|
});
|
|
63
65
|
```
|
|
66
|
+
|
|
67
|
+
## Development workflow (OpenSpec)
|
|
68
|
+
|
|
69
|
+
This repo uses [OpenSpec](https://github.com/Fission-AI/OpenSpec) for spec-driven development. Changes are planned as artifacts under `openspec/changes/` before implementation.
|
|
70
|
+
|
|
71
|
+
### Prerequisites
|
|
72
|
+
|
|
73
|
+
Install the OpenSpec CLI (**v1.4.1 or later** — required for `--json` output fields used by the agent skills):
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm install -g @fission-ai/openspec
|
|
77
|
+
openspec --version # must be >= 1.4.1
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Commands
|
|
81
|
+
|
|
82
|
+
Use these slash commands in Cursor or Claude Code:
|
|
83
|
+
|
|
84
|
+
| Command | Purpose |
|
|
85
|
+
|---|---|
|
|
86
|
+
| `/opsx-explore` | Explore ideas and clarify requirements (no code changes) |
|
|
87
|
+
| `/opsx-propose` | Create a change with proposal, design, specs, and tasks |
|
|
88
|
+
| `/opsx-apply` | Implement tasks from an active change |
|
|
89
|
+
| `/opsx-sync` | Sync delta specs from a change to main specs |
|
|
90
|
+
| `/opsx-archive` | Archive a completed change |
|
|
91
|
+
|
|
92
|
+
### Typical flow
|
|
93
|
+
|
|
94
|
+
1. `/opsx-explore` — think through the problem
|
|
95
|
+
2. `/opsx-propose my-change-name` — generate planning artifacts
|
|
96
|
+
3. `/opsx-apply` — implement the tasks
|
|
97
|
+
4. `/opsx-sync` — merge specs into `openspec/specs/`
|
|
98
|
+
5. `/opsx-archive` — move the change to `openspec/changes/archive/`
|