Add Mixpanel analytics events for collection drafting workflow #19516
+144
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds Mixpanel analytics events to track the collection drafting workflow in Vortex.
Changes
collection_drafted- Fired when a user creates a new collection draftcollection_draft_uploaded- Fired when a user uploads a new collection draft to Nexus Mods for the first timecollection_draft_updated- Fired when a user uploads an update to an existing collectionTesting
Prerequisites
1. Enable Telemetry
Telemetry must be enabled to test events:
Note: Telemetry was off on my machine. Not sure if defaults to off in development builds. AFAIK a consent dialog appears on first login, but I don't remember it 😅
2. Check DNS/Network
Important: DNS blockers like AdGuard Home, Pi-hole, or browser extensions may block Mixpanel events.
Whitelist these domains:
*.mixpanel.com*.mxpnl.comThat's what I had to do on my end; was caught offguard.
How to Trigger Each Event
collection_draftedFires when creating a new collection draft:
collection_draft_uploadedFires on first-time upload:
collectionId)collection_draft_updatedFires when uploading an update:
collectionIdVerification
yarn startFiles Modified
src/extensions/analytics/mixpanel/MixpanelEvents.ts- New event classesextensions/collections/src/index.ts- Track empty collectionextensions/collections/src/util/transformCollection.ts- Track profile/quick collectionsextensions/collections/src/collectionExport.ts- Track uploads/updatessrc/util/api.ts- Export new eventsetc/vortex_devel.api.md- API docs