diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-10 20:02:32 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-10 20:02:32 +0800 |
| commit | da5ce0b668ab96f6cc441642563e6dac59b71831 (patch) | |
| tree | 9989d8d722250b117e4fb5082b9fd9a402f48caf /layouts/_partials/scripts/fancybox-js.html | |
| parent | 1e4ca50749793b4178426418d9d34a74c59d8319 (diff) | |
chore: track fancybox usage
I'm considering removing Fancybox because it loads a large JavaScript file and can significantly affects page load speed. First, I need to see if it's a frequently used feature.
Diffstat (limited to 'layouts/_partials/scripts/fancybox-js.html')
| -rw-r--r-- | layouts/_partials/scripts/fancybox-js.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/layouts/_partials/scripts/fancybox-js.html b/layouts/_partials/scripts/fancybox-js.html index 4823f30c..d810dd29 100644 --- a/layouts/_partials/scripts/fancybox-js.html +++ b/layouts/_partials/scripts/fancybox-js.html @@ -1,2 +1,10 @@ <script src="/js/fancybox.umd.js"></script> -<script>Fancybox.bind("[data-fancybox]");</script> +<script> +Fancybox.bind("[data-fancybox]", { + on: { + close: () => { + umami.track('🖼️ Fancybox Closed'); + }, + }, +}); +</script> |
