mirror of
https://github.com/misode/misode.github.io.git
synced 2026-04-23 15:17:09 +00:00
Add theme tracking
This commit is contained in:
@@ -197,6 +197,7 @@ Promise.all([
|
|||||||
})
|
})
|
||||||
|
|
||||||
const updateTheme = (theme: string | null) => {
|
const updateTheme = (theme: string | null) => {
|
||||||
|
ga('set', 'dimension1', theme ?? 'default');
|
||||||
if (theme === null) return
|
if (theme === null) return
|
||||||
if (theme === 'dark') {
|
if (theme === 'dark') {
|
||||||
document.documentElement.setAttribute('data-theme', 'dark')
|
document.documentElement.setAttribute('data-theme', 'dark')
|
||||||
|
|||||||
Reference in New Issue
Block a user