I recently set up Umami as the analytics engine for my website. While it was easy to setup, I wanted to ensure my own page views weren’t being tracked.
On desktop, this was straightforward: I ran localStorage.setItem('umami.disabled', 1);
in the browser’s developer console.
However, I also wanted to achieve the same result on my mobile device. This required a bit more effort since accessing the developer console on a phone isn’t as simple.
Here’s how I did it:
- Connected my Samsung Galaxy M30 (Android 10) to my laptop via USB.
- Enabled developer mode by navigating to Settings > About Phone > Software Information and tapping Build Number multiple times.
- In the new Developer Options menu, toggled USB Debugging.
- On my laptop, I opened
chrome://inspect#devices
on Chrome. - This displayed all active Chrome tabs on my mobile. I clicked Inspect on the desired tab, accessed the developer console, and ran:
localStorage.setItem('umami.disabled', 1);