Commit dbcb52f9 authored by tom's avatar tom

add attributes to growth book

parent 6ff8ee8b
......@@ -7,7 +7,7 @@ import { deviceType } from 'react-device-detect';
import config from 'configs/app';
import * as cookies from 'lib/cookies';
import { growthBook } from 'lib/growthbook/index';
import { growthBook } from 'lib/growthbook/init';
import getQueryParamString from 'lib/router/getQueryParamString';
export default function useMixpanelInit() {
......@@ -29,6 +29,9 @@ export default function useMixpanelInit() {
growthBook?.setAttributes({
...growthBook.getAttributes(),
id: mixpanel.get_distinct_id(),
time_zone: Intl.DateTimeFormat().resolvedOptions().timeZone,
language: mixpanel.get_property('Language'),
chain_id: mixpanel.get_property('Chain id'),
});
},
};
......
......@@ -13,7 +13,7 @@ import useQueryClientConfig from 'lib/api/useQueryClientConfig';
import { AppContextProvider } from 'lib/contexts/app';
import { ChakraProvider } from 'lib/contexts/chakra';
import { ScrollDirectionProvider } from 'lib/contexts/scrollDirection';
import { growthBook } from 'lib/growthbook/index';
import { growthBook } from 'lib/growthbook/init';
import { SocketProvider } from 'lib/socket/context';
import theme from 'theme';
import AppErrorBoundary from 'ui/shared/AppError/AppErrorBoundary';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment