mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-17 16:45:31 -04:00
send event to analytics on theme toggle
This commit is contained in:
@@ -62,9 +62,13 @@
|
||||
if (!active) {
|
||||
activateTheme(dark);
|
||||
sto.setItem(pref_key, dark);
|
||||
// send click event to analytics
|
||||
sa_event('triggered_dark_mode');
|
||||
} else {
|
||||
activateTheme(light);
|
||||
sto.setItem(pref_key, light);
|
||||
// send click event to analytics
|
||||
sa_event('triggered_light_mode');
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user