Skip to content

docs: document advanced_feature_flags_dedup_per_session config option#15765

Merged
dustinbyrne merged 2 commits intomasterfrom
docs/advanced-feature-flags-dedup-per-session
Mar 18, 2026
Merged

docs: document advanced_feature_flags_dedup_per_session config option#15765
dustinbyrne merged 2 commits intomasterfrom
docs/advanced-feature-flags-dedup-per-session

Conversation

@dustinbyrne
Copy link
Copy Markdown
Contributor

Problem

The new advanced_feature_flags_dedup_per_session config option in posthog-js (PostHog/posthog-js#3241) needs documentation so users know it exists and when to use it.

The core issue: $feature_flag_called events are deduplicated globally — once cached for a flag+value, they don't fire again unless identify/reset is called. If a user checked a flag before an experiment launched, the experiment never sees their exposure.

Changes

contents/docs/libraries/js/config.mdx — Added advanced_feature_flags_dedup_per_session to the advanced configuration table with a description linking to experiments and exposures docs.

contents/docs/experiments/troubleshooting.mdx — New section "Why are returning users not showing as exposed to my experiment?" explaining the dedup caching issue and how to fix it.

contents/docs/experiments/exposures.mdx — New section "Ensuring exposures for returning users" explaining the dedup behavior and the config option, placed before the custom exposure events section.

- Add to JS SDK advanced config table
- Add troubleshooting entry for missing experiment exposures
- Add section in exposures docs on ensuring exposures for returning users
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 16, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Mar 16, 2026 06:46PM

@dustinbyrne dustinbyrne marked this pull request as draft March 16, 2026 16:58
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 16, 2026

Vale prose linter → found 3 errors, 49 warnings, 1 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/experiments/exposures.mdx — 1 errors, 9 warnings, 0 suggestions
Line Severity Message Rule
11:234 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
17:45 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
62:63 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
66:30 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
72:113 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
86:36 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
116:5 warning 'Why SRM matters' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
145:117 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
147:5 warning 'What to do if SRM is detected' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
178:38 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
contents/docs/experiments/troubleshooting.mdx — 0 errors, 9 warnings, 0 suggestions
Line Severity Message Rule
14:4 warning 'Have a question? Ask PostHog AI' heading should be in sentence case, and product names should be capitalized. PostHogBase.SentenceCase
20:53 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
22:111 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
43:21 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
45:217 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
49:18 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
51:57 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
82:14 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
100:48 warning Capitalize 'Experimentation' for PostHog's product. Use 'experimentation' for the general industry concept. PostHogBase.ProductNames
contents/docs/libraries/js/config.mdx — 2 errors, 31 warnings, 1 suggestions
Line Severity Message Rule
20:136 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
42:242 warning 'pageleave' is a possible misspelling. PostHogBase.Spelling
48:205 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
48:308 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
50:213 warning Capitalize 'Logs' for PostHog's product. Use 'logs' for the general industry concept. PostHogBase.ProductNames
52:233 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
53:270 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
54:448 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
54:500 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
54:565 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
60:263 warning 'googlebot' is a possible misspelling. PostHogBase.Spelling
61:239 suggestion Address the reader directly. Use 'you' instead of 'the user'. PostHogDocs.DirectAddress
76:68 warning 'autocapture's' is a possible misspelling. PostHogBase.Spelling
82:187 warning 'textarea' is a possible misspelling. PostHogBase.Spelling
87:16 warning 'rageclick' is a possible misspelling. PostHogBase.Spelling
106:216 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
106:255 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
107:178 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
108:152 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
108:170 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
108:236 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
108:254 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames
108:291 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
109:208 warning Capitalize 'Experiments' for PostHog's product. Use 'experiments' for the general industry concept. PostHogBase.ProductNames
110:130 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
112:125 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
112:390 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
114:118 warning 'params' is a possible misspelling. PostHogBase.Spelling
115:482 error Hi, Andy here... use an en dash ( – ) with spaces. On Mac, holding down the Option and hyphen key will give you an en dash. PostHogBase.EnDash
122:244 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
136:125 warning 'gzip' is a possible misspelling. PostHogBase.Spelling
137:7 warning Capitalize 'Feature Flags' for PostHog's product. Use 'Feature flags' for the general industry concept. PostHogBase.ProductNames
137:50 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
138:63 warning Capitalize 'Surveys' for PostHog's product. Use 'surveys' for the general industry concept. PostHogBase.ProductNames

@dustinbyrne dustinbyrne marked this pull request as ready for review March 16, 2026 18:56
@dustinbyrne dustinbyrne requested a review from a team March 16, 2026 18:56
@dustinbyrne dustinbyrne merged commit b6d3231 into master Mar 18, 2026
19 checks passed
@dustinbyrne dustinbyrne deleted the docs/advanced-feature-flags-dedup-per-session branch March 18, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants