Repository navigation
Conversation
The new setting umami.distinctIdParameter names the event data key whose value the tag sends as payload.id. Umami v3.4.0 and later add the distinct ID to the session hash, so visitors behind one IP with the same user agent get separate sessions. Empty (default) keeps the current behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #170 +/- ##
========================================
+ Coverage 4.62% 4.75% +0.13%
========================================
Files 138 138
Lines 4302 4308 +6
========================================
+ Hits 199 205 +6
Misses 4103 4103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The Umami tag sends a configurable event data value as the Umami distinct ID (
payload.id).Type of Change
Related Issues
Follow-up of #165.
Changes
umami.distinctIdParameter: the event data key whose value the tag sends aspayload.id. Empty (default) keeps the current behavior.tag.NewUmamiadds the template parameterdistinctIdParameterwhen the setting is set. The signature does not change.distinctIdParameter. The JS reads that key from the event data and setspayload.idonly for a non-empty value.sesamy.schema.json,sesamy.yamlanddocs/providers/umami.mddescribe the setting.Checklist
Notes
Why: Umami v3.4.0 adds the distinct ID to the session hash (
uuid(website, ip, userAgent, salt, distinctId ?? '')). Server-side tracking sends the visitor IP since #165, but visitors behind one corporate IP with the same browser still share one Umami session. A first-party session ID as distinct ID separates them. It does not join sessions across IP addresses, user agents or salt rotations; the docs say so.Compatibility:
payload.idas the session's distinct ID but does not use it for the session hash.read_event_dataalready allowsanykey, so the permissions do not change.templates.tag) keep their template; it ignores the new parameter.How tested:
TestNewUmami_DistinctIDParameter(parameter present with the setting, absent without it).TestConfigregeneratedsesamy.schema.json.golangci-lint run: 0 issues.go test -tags=safe ./...: pass.session_idwith a value givespayload.id; no setting gives noid; an empty value gives noid.