Mkdirs Docs

Analytics

How to configure the analytics.

Mkdirs uses Google Analytics or OpenPanel as the analytics service, but you can also add other analytics services, and we will support more in the future.

Google Analytics

Follow the Google Analytics official guide to set up Google Analytics for a website.

Then copy the Google Analytics ID, and set it to the .env file.

# .env
# [only required if you are using Google Analytics]
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=your_google_analytics_id;

Google Analytics

OpenPanel Analytics

Create an account on OpenPanel

If you don't have an account, follow the steps to create your account.

Create a new project

Click on the Create Project button, enter the name of your project to create a new one.

Create a new client

Click on the ... button next to the project name, and select Projects.

Click on the New Client button, and enter the domain to create a new client.

Get the OpenPanel Client ID

Once the client is created, copy the Client ID and set it to the .env file.

# .env
# [only required if you are using OpenPanel Analytics]
NEXT_PUBLIC_OPENPANEL_CLIENT_ID=your_open_panel_client_id;

OpenPanel Client

Umami Analytics

Create an account on Umami

If you don't have an account, follow the steps to create your account.

Create a new website

After logging in, click on the Add Website button and enter your website details.

Get the Website ID

Once the website is created, you'll find the Website ID in the website settings. Copy it and set it along with the script URL in your .env file.

# .env
# [only required if you are using Umami Analytics]
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your_website_id
NEXT_PUBLIC_UMAMI_SCRIPT=https://cloud.umami.is/script.js

Plausible Analytics

Create an account on Plausible

If you don't have an account, follow the steps to create your account.

Add a new site

After logging in, click on the Add a site button and enter your domain name.

Configure the domain

Once the site is added, copy your domain name and set it along with the script URL in your .env file.

# .env
# [only required if you are using Plausible Analytics]
NEXT_PUBLIC_PLAUSIBLE_DOMAIN=your_domain
NEXT_PUBLIC_PLAUSIBLE_SCRIPT=https://plausible.io/js/script.js

Video tutorial

Further Reading

Last updated on

On this page