Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics | Add support for super properties and appPlatform #7801

Merged
merged 6 commits into from
Jun 5, 2024

Conversation

BillCarsonFr
Copy link
Member

Add support for posthog super properties (added to all events).
The analytics-event dependency has been updated to latest release.

In order to add unit test I had to introduce a protocol interface for PostHog and added some Mock classes.

Fixes https://github.com/element-hq/crypto-internal/issues/322

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

@BillCarsonFr BillCarsonFr marked this pull request as ready for review June 3, 2024 07:20
Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Nice, LGTM 👍

Riot/Modules/Analytics/AnalyticsClientProtocol.swift Outdated Show resolved Hide resolved
Comment on lines -30 to +47
var isRunning: Bool { postHog != nil && !postHog!.isOptOut() }
var isRunning: Bool {
guard let postHog else { return false }
return !postHog.isOptOut()
}
Copy link
Member

Choose a reason for hiding this comment

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

Looks much more Swifty 👌

RiotTests/FakeUtils.swift Outdated Show resolved Hide resolved
Riot/Modules/Analytics/Analytics.swift Outdated Show resolved Hide resolved
Riot/Modules/Analytics/Analytics.swift Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Jun 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@BillCarsonFr BillCarsonFr merged commit f38a422 into develop Jun 5, 2024
5 checks passed
@BillCarsonFr BillCarsonFr deleted the valere/super_properties branch June 5, 2024 13:10
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