iconDirEasy

Web Analytics

Captures pageviews and custom events.

DirEasy use Plausible apis to track pageviews and show the analytics inside the app. If you don't need built-in analytics, you can switch to a different analytics tool (Like Google Analytics, Vercel Web Analytics, Umami, OpenPanel, etc).

Analytics

Plausible

Plausible.io is a simple, privacy-first alternative to Google Analytics.

Add environment variables

.env
PLAUSIBLE_API_KEY=
# only required if you're using a self-hosted version, then set to your self-hosted instance
#PLAUSIBLE_URL=
PLAUSIBLE_SITE_ID=
If you did not set these environment variables above, the analytics will not show inside the app.

Vercel Web Analytics

Vercel's built-in analytics tool offers detailed insights into your website's visitors with new metrics like top pages, top referrers, and demographics.

1. Add environment variables

First, you need to add the following environment variables to your project:

.env
NEXT_PUBLIC_ENABLE_VERCEL_ANALYTICS="true"

2. Enable it from the Vercel dashboard

Then you have to do to enable it is visit the Analytics tab in your Vercel project and click Enable from the dialog.

Read more about it here.

Troubleshooting.

If everything is set up properly, you should be able to see a Fetch/XHR request in your browser's Network tab from /_vercel/insights/view when you visit any page.

If you see _vercel/insights/script.js 404, make sure you have enable it from the Vercel dashboard. Otherwise vercel will keep trying to re-request that js file, which will consume a lot of vercel requests.

Google Analytics

Google Analytics tracks user behavior, page views, session duration, and other engagement metrics to provide insights into user activity and marketing effectiveness. GA tracking code is injected using @next/third-parties for performance reasons.

To enable it, simply add a NEXT_PUBLIC_GA_MEASUREMENT_ID environment variable to your project.

Umami

Umami is a open source web analytics tool. It is a simple, self-hosted alternative to Google Analytics. It is privacy-friendly and does not use cookies. It is also fast and lightweight.

To enable it, simply add NEXT_PUBLIC_UMAMI_SITE_ID and NEXT_PUBLIC_UMAMI_SITE_SRC environment variable to your project.

OpenPanel

OpenPanel is a self-hosted alternative to Google Analytics.

To enable it, simply add NEXT_PUBLIC_OPENPANEL_CLIENT_ID environment variable to your project.

On this page