Skip to content

Commit 29d344c

Browse files
authored
feat: surveys GA (#215)
* feat: surveys GA * fix: remove unused import * fix: add note on PosthogObserver * fix: add web doc
1 parent f71474e commit 29d344c

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Next
22

3+
- feat: surveys GA ([#215](https://github.com/PostHog/posthog-flutter/pull/215))
4+
> Note: Surveys are now enabled by default.
5+
36
## 5.7.0
47

58
- feat: add manual error capture ([#212](https://github.com/PostHog/posthog-flutter/pull/212))

lib/src/posthog_config.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import 'package:meta/meta.dart';
2-
31
enum PostHogPersonProfiles { never, always, identifiedOnly }
42

53
enum PostHogDataMode { wifi, cellular, any }
@@ -31,13 +29,17 @@ class PostHogConfig {
3129
/// iOS only
3230
var dataMode = PostHogDataMode.any;
3331

34-
/// Enable Surveys (Currently for iOS only)
32+
/// Enable Surveys
3533
///
36-
/// Note: Please note that after calling Posthog().close(), surveys will not be rendered until the SDK is re-initialized and the next navigation event occurs.
34+
/// **Notes:**
35+
/// - After calling `Posthog().close()`, surveys will not be rendered until the SDK is re-initialized and the next navigation event occurs.
36+
/// - You must install `PosthogObserver` in your app for surveys to display
37+
/// - See: https://posthog.com/docs/surveys/installation?tab=Flutter#step-two-install-posthogobserver
38+
/// - For Flutter web, this setting will be ignored. Surveys on web use the JavaScript Web SDK instead.
39+
/// - See: https://posthog.com/docs/surveys/installation?tab=Web
3740
///
38-
/// Experimental. Defaults to false.
39-
@experimental
40-
var surveys = false;
41+
/// Defaults to true.
42+
var surveys = true;
4143

4244
/// Configuration for error tracking and exception capture
4345
final errorTrackingConfig = PostHogErrorTrackingConfig();

0 commit comments

Comments
 (0)