1
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:
2020-04-30 09:42:00 -04:00
parent 35bfbb517c
commit dead391723
6 changed files with 62 additions and 54 deletions

View File

@@ -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);
}