mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 07:10:41 +00:00
Add theme tracking
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user