Add theme tracking

This commit is contained in:
Misode
2020-07-14 02:25:31 +02:00
parent 99c945150a
commit e8960579d3

View File

@@ -197,6 +197,7 @@ Promise.all([
})
const updateTheme = (theme: string | null) => {
ga('set', 'dimension1', theme ?? 'default');
if (theme === null) return
if (theme === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark')