Self-Host Web Analytics and Conversion Optimization Tool “Matomo” – Installing Tutorial

AsSalam and hi all.

Data analytics and web analytics is a “most demanding skill” that people talking now. Regardless what industry or nature of your works, from government to public sectors, either business, education, geography, security, health or what ever you name it, all looking for data analytics to help them optimize all information and data that they already have.

 

For web, web analytics was overwhelming with Google Analytics tools and services, but there are others web analytic tools out there that can give you the analytic capability you want, one of it is Matomo.

 

 

According to Wikipedia ;

Matomo, formerly Piwik, is a free and open source web analytics application developed by a team of international developers, that runs on a PHP/MySQL webserver. It tracks online visits to one or more websites and displays reports on these visits for analysis. Wikipedia

 

What interest me more about Matomo is the capability to self-host your analytic tools and its an open source licence where you can customize and do what ever you wish or capable and sell it or put it up for free. I will talk about Matomo in details in other article, but in this article/tutorial, I just want to guide you on how to install and setup Matomo in your own hosting. Lets start!

 

  1. We need to get the Matamo installer (free, thank you!). Go to matomo.org and navigate to On-Premise –> Download for free.
  2. Download the latest available version.
  3. Then, go to your own hosting, login.
  4. We are going to upload the installer in to our hosting, best to create a folder for it. Go to your Files –> File Manager.
  5. in your public_html folder, create a folder that you wish to place and install your matomo. For example, I create a folder name matomo.
  6. Then, check your matomo installer, either it was downloaded. Extract and you notice there are folder matomo where all source files and folders are and a How to install Matomo file. We just need to upload the matomo folder into our hosting.
  7. I compress the matomo folder as .zip and upload in to matomo folder in my hosting.
  8. Once the .zip file uploaded, extract the files.
  9. Ok, noticed that my matomo files was in a folder name matomo IN a matomo directory. This will see as /matomo/matomo/ and we dont want that, we just want /matomo , so I need to move the files ;
  10. Moving files out to /public_html/matomo
  11. Ok, now its looks good! All files is ready for installation! go to yourdomain.com/matomo
  12. You must get the welcome page as below, click Next.
  13. Matomo will check your hosting and looks like I have few Error and Warning, lets fix it.
  14. Error was, Required PHP configuration (php.ini). Copy the code;
  15. Go back to your cPanel and at Software –> MultiPHP INI Editor.
  16. Go to Editor Mode tab and select the domain name, then enter/write the code below and click Save button.
  17. Back to matomo and refresh the page, all good, just another warning;
  18. Its regarding SSL. You should have SSL installed on your hosting, click the click here continue the installation process over SSL.
  19. I have Other functions warning and I just ignore it this time and proceed the installation, click the Next button.
  20. Next is Database Setup, what ever you do, you can not pass this as we did not create the databases yet.
  21. Go to your cPanel –>Databases –> MySQL Database Wizard. We need to create the database 1st.
  22. Give a name for your database, for example thedata , will known as wansazli_thedata. Then click Next Step button.
  23. Then, create a database username and password. Remember the details or write somewhere that safe. Then, click the Create User button.
  24. Now, give ALL PRIVILAGES to your user. Then click the Save button.
  25. Done and ready. Now, back to matomo page.
  26. Enter the correct Login username, password and database name that you create just now. Make sure the Table prefix is correct and click the Next button.
  27. You should get a success as below. Good job, click Next button.
  28. Now, we are going to create a user , consider as Super User/admin. Enter usernamepassword and  email, make sure you remember it! Then click Next button.
  29. Basically, your installation is done. Now, lets setup the 1st web that you wish to include in to your motomo analytic and start get the data.
  30. Enter the Website name, Website URL, website time zone and either its is an eCommerce site or not. Then click Next button.
  31. Matomo will provide you with a script that you need to put in to header section of your website that you register for monitoring. Copy the script,
  32. Login in to your website, I assume you are using WordPress. ( also work in any other CMS or custome php/html site)
  33. Go to Appearance –> Editor and look for header.php file. Insert the script in header section as below, then click Update file button;
  34. In your matomo page, click the Next button once you insert the scrip in to your website.
  35. All set, click the Continue To Matomo button.
  36. Access your Matomo, enter the username and password, click Sign In button.
  37. Walla, welcome to your own analytic dashboard. You may see data from the website that you set to monitor. If not, try to visit the site and refresh the page.

 

In next article/tutorial (insyaAllah), I will try to write and exploration what Matomo tools can do. Till then, you may explore it and let me know what you guys/girls think about Matomo. If you still wondering which web analytic to choose between Matomo and not Google Analytic, read : MATOMO VS GOOGLE ANALYTICS 360

TQ.