Tips and FAQs

Collection of tips, quirks and FAQs.

Prevent tracking yourself

To prevent tracking yourself, add umami.disabled to your browser’s localStorage. Set the value to 1.

Go to your website, copy and run this in your browser's console:

localStorage.setItem('umami.disabled', 1);

Also, here is a simple plugin I use to "automate" this on mobile and live sites:

itsmebob.client.ts
// add to your plugins folder
export default defineNuxtPlugin({
  hooks: {
    'app:beforeMount': async function () {
      const query = useRoute().query;
      if ('itsmebob' in query) {
        const { itsmebob, ...otherParams } = query;
        navigateTo({ query: otherParams });
        window.localStorage.setItem('umami.disabled', '1');
        window.console.info(`Hello, Bob.`);
        // now when visisting your live site for the first time
        // go to example.com?itsmebob
      }
    },
  },
});

Track referrers

Nuxt Umami can automatically use ref or referrer from the URL parameters if document.referrer is unavailable.

Like document.referrer, ref must be a full URL (including http).

mysite.com?ref=https://example.site

mysite.com?referrer=https://vuejs.org

Umami also has built-in support for UTMs.

FAQs

  • autoTrack is not working?
    The current implementation of autoTrack relies on <NuxtPage> being present in your app. If you don’t have <NuxtPage>, you’d have to manually track page-view onMounted. See this issue.
  • Welp, I am getting some CORS errors!
    Some adblockers like uBlock and Ghostery block Umami Cloud’s endpoints. Try to disable your adblockers (yes, all of them). Also, double-check your config and Umami version.
    You can also use proxy mode to bypass this.
  • How do I set up my own Umami instance?
    Miracle Onyenma published a simple guide in his blog. Check it out.
  • FAQs with only 4 questions?
    Don't hesitate to open an issue. I'd be happy to help.
  • I want to sponsor this project. How do I?
    Absolutely, thank you.