visit
Lately, I was looking for an analytics solution for my
So, I started searching for google analytics alternatives, and I found a few interesting ones like
Visit
Go to the ____and login into your Heroku account; if you don't have an account, then click on signup to create one.
After login, go to the dashboard and from there, click on New > Create new app.
Now, give a name to your app. I have given it website-analytics-umami. Then click on the create app button to create your app.
From your dashboard, click on the app name that you just created. I will click on website-analytics-umami.
Now, navigate to the deploy tab, and click on the Connect to GitHub button.
Once you click the Connect to GitHub button, you will have to authorize Heroku to access your GitHub repositories.
Search for a repository that you want to connect to (that is Umami), and then click on connect button to connect your Heroku app with the umami repository.
After connecting your repository, scroll down to the Automatic deploys section, and click on Enable Automatic deploys. Heroku will automatically deploy if you make any new changes to this repository.
Navigate to the Resource tab, scroll down to the Add-ons section, and then search for Postgres.
Select the Heroku Postgres option. After selecting it, you will see a modal like below. Select a free plan, and click on the submit order form to add this add-on to your application.
Umami requires the env variable DATABASE_URL to work with the database. Navigate to the settings tab, scroll down to the Config Vars section, and you will see that Heroku has automatically created an env variable DATABASE_URL, so you don't have to set it manually.
Umami requires one more env variable, HASH_SALT. You can add that from the Config Vars section.
Navigate to the deploy tab, scroll down to the Manual deploy section, and then click on the Deploy Branch button and wait for some time to finish the deployment.
Once your app is deployed, you will see a green check for Deploy to Heroku and a message: Your app was successfully deployed.
If you open the application, you will see the login screen like this, by default, Umami creates one admin user with username admin and password umami.
From the dashboard, navigate to settings and click on the Add website button.
To track stats for your website, you will have to get the tracking code and place it in the <head>
section of your website.
<head>
...
<script async defer data-website-id="006299fc-774a-4eda-be0f-8556e629930a" src="//app-name.herokuapp.com/umami.js"></script>
</head>
Now from the website's section, click on the website that you have added to view the analytics. I will click on my portfolio website.
You will be redirected to the dashboard where you will see all the available analytics metrics for your website.
Example:
Hashnode Also uses the umami for providing advanced analytics for blogs.
Also published