Skip to content

Conversation

@Phanatic
Copy link
Contributor

Changes

We found through a customer issue that calling posthog.reset() doesn't remove the tracking properties added by PostHog Surveys from local storage. This PR adds a reset method to posthog surveys and calls it from posthog-core, whenever posthog.reset() is called.

Checklist

  • Tests for new code (see advice on the tests we use)
  • Accounted for the impact of any changes across different browsers
  • Accounted for backwards compatibility of any changes (no breaking changes in posthog-js!)

@vercel
Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog-js ✅ Ready (Inspect) Visit Preview Oct 23, 2024 9:00pm

@Phanatic Phanatic requested a review from dmarticus October 23, 2024 20:37
@Phanatic Phanatic force-pushed the reset-survey-storage branch from 46a9871 to 7b44996 Compare October 23, 2024 20:41
@Phanatic Phanatic force-pushed the reset-survey-storage branch from 7b44996 to 47bd7ae Compare October 23, 2024 20:42
@Phanatic Phanatic added the bump minor Bump minor version when this PR gets merged label Oct 23, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2024

Size Change: +52.8 kB (+1.83%)

Total Size: 2.94 MB

Filename Size Change
dist/all-external-dependencies.js 182 kB +5 B (0%)
dist/array.full.es5.js 248 kB +340 B (+0.14%)
dist/array.full.js 335 kB +293 B (+0.09%)
dist/array.full.no-external.js 334 kB +293 B (+0.09%)
dist/array.js 166 kB +10.3 kB (+6.6%) 🔍
dist/array.no-external.js 165 kB +10.3 kB (+6.64%) 🔍
dist/main.js 166 kB +10.3 kB (+6.57%) 🔍
dist/module.full.js 335 kB +293 B (+0.09%)
dist/module.full.no-external.js 334 kB +293 B (+0.09%)
dist/module.js 166 kB +10.3 kB (+6.6%) 🔍
dist/module.no-external.js 165 kB +10.3 kB (+6.64%) 🔍
dist/surveys-preview.js 56.7 kB +4 B (+0.01%)
dist/surveys.js 62.1 kB +4 B (+0.01%)
ℹ️ View Unchanged
Filename Size
dist/exception-autocapture.js 8.75 kB
dist/external-scripts-loader.js 2.19 kB
dist/recorder-v2.js 102 kB
dist/recorder.js 103 kB
dist/tracing-headers.js 1.33 kB
dist/web-vitals.js 10.3 kB

compressed-size-action

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

@Phanatic Phanatic merged commit 0cee24b into main Oct 24, 2024
12 checks passed
@Phanatic Phanatic deleted the reset-survey-storage branch October 24, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump minor Bump minor version when this PR gets merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants