Reading Time: 6 minutes. Enjoy!
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!
- We need to get the Matamo installer (free, thank you!). Go to matomo.org and navigate to On-Premise –> Download for free.
- Download the latest available version.
- Then, go to your own hosting, login.
- We are going to upload the installer in to our hosting, best to create a folder for it. Go to your Files –> File Manager.
- 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.
- 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.
- I compress the matomo folder as .zip and upload in to matomo folder in my hosting.
- Once the .zip file uploaded, extract the files.
- 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 ;
- Moving files out to /public_html/matomo
- Ok, now its looks good! All files is ready for installation! go to yourdomain.com/matomo
- You must get the welcome page as below, click Next.
- Matomo will check your hosting and looks like I have few Error and Warning, lets fix it.
- Error was, Required PHP configuration (php.ini). Copy the code;
- Go back to your cPanel and at Software –> MultiPHP INI Editor.
- Go to Editor Mode tab and select the domain name, then enter/write the code below and click Save button.
- Back to matomo and refresh the page, all good, just another warning;
- Its regarding SSL. You should have SSL installed on your hosting, click the click here continue the installation process over SSL.
- I have Other functions warning and I just ignore it this time and proceed the installation, click the Next button.
- Next is Database Setup, what ever you do, you can not pass this as we did not create the databases yet.
- Go to your cPanel –>Databases –> MySQL Database Wizard. We need to create the database 1st.
- Give a name for your database, for example thedata , will known as wansazli_thedata. Then click Next Step button.
- Then, create a database username and password. Remember the details or write somewhere that safe. Then, click the Create User button.
- Now, give ALL PRIVILAGES to your user. Then click the Save button.
- Done and ready. Now, back to matomo page.
- 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.
- You should get a success as below. Good job, click Next button.
- Now, we are going to create a user , consider as Super User/admin. Enter username, password and email, make sure you remember it! Then click Next button.
- 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.
- Enter the Website name, Website URL, website time zone and either its is an eCommerce site or not. Then click Next button.
- 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,
- Login in to your website, I assume you are using WordPress. ( also work in any other CMS or custome php/html site)
- Go to Appearance –> Editor and look for header.php file. Insert the script in header section as below, then click Update file button;
- In your matomo page, click the Next button once you insert the scrip in to your website.
- All set, click the Continue To Matomo button.
- Access your Matomo, enter the username and password, click Sign In button.
- 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
If you like this article, then please follow me on Facebook. Thank you.