alshedivat / al-folio

A beautiful, simple, clean, and responsive Jekyll theme for academics
https://alshedivat.github.io/al-folio/
MIT License
11.19k stars 11.24k forks source link

Google Analytics not tracking website activity when dark mode is enabled. #294

Closed p-costa closed 3 years ago

p-costa commented 3 years ago

Thanks for this awesome template!

Acknowledge the following

Describe the bug I'm not sure if others have experienced this, but I get no activity reported in the main page if dark mode is activated on the website. If I flip the dark mode switch or start to navigate to the other pages, then I get proper online activity reporting.

alshedivat commented 3 years ago

Thanks for reporting this. How do you know that google analytics was not tracking the website? Could you expand a bit more on the issue so that it can be reproduced and help us figure out the root cause?

p-costa commented 3 years ago

Hi Maruan @alshedivat , thanks, and my apologies if the description of my issue was vague.

Actually, I cannot reproduce the issue right now! This leads me to believe that this may have been some issue on my end and not with the al-folio theme... What was happening is that when I was opening my webpage on the browser, google analytics would report "0 active users", for the dark version of my webpage (opening in dark by default).

However, I tested again on a local build, and it seems to be reporting the activity correctly... So please feel free to close the issue; I'd re-open it and follow up with a proper reproducer if something like this occurs again.

Thanks!

alshedivat commented 3 years ago

Thanks for clarifying!