We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b0bc3b commit 01627efCopy full SHA for 01627ef
src/Shared/Providers/ThemeProvider/utils.ts
@@ -30,6 +30,14 @@ export const setThemePreferenceInLocalStorage = (themePreference: ThemePreferenc
30
export const logThemeToAnalytics = ({ appTheme, themePreference }: ThemeConfigType) => {
31
const action = themePreference === THEME_PREFERENCE_MAP.auto ? `system-${appTheme}` : appTheme
32
33
+ if ('gtag' in window && window.gtag && typeof window.gtag === 'function') {
34
+ window.gtag('set', 'user_properties', {
35
+ appTheme,
36
+ themePreference,
37
+ })
38
+ ReactGA.send('pageview')
39
+ }
40
+
41
ReactGA.event({
42
category: 'application-theme',
43
action: `theme-changed-to-${action}`,
0 commit comments