Hook analytics into the SDK

This commit is contained in:
James Salter 2021-07-21 16:15:18 +01:00
parent 6737cfd297
commit 34f8c60b34
3 changed files with 10 additions and 0 deletions

View file

@ -36,6 +36,7 @@ import { UIFeature } from "../../../../../settings/UIFeature";
import { isE2eAdvancedPanelPossible } from "../../E2eAdvancedPanel";
import CountlyAnalytics from "../../../../../CountlyAnalytics";
import { replaceableComponent } from "../../../../../utils/replaceableComponent";
import { Anonymity, getAnalytics } from "../../../../../PosthogAnalytics";
export class IgnoredUser extends React.Component {
static propTypes = {
@ -106,6 +107,7 @@ export default class SecurityUserSettingsTab extends React.Component {
_updateAnalytics = (checked) => {
checked ? Analytics.enable() : Analytics.disable();
CountlyAnalytics.instance.enable(/* anonymous = */ !checked);
getAnalytics().setAnonymity(checked ? Anonymity.Pseudonymous : Anonymity.Anonymous);
};
_onExportE2eKeysClicked = () => {