How to install Open Web Analytics (OWA) on Ubuntu and CentOS

Looking for open source Analytics web software that can become your Google Analytics alternative then Open Web Analytics could be somewhere around that. It can’t completely beat the Google Analytics but enough to replace and become your own fully control Analytical solution. The Open Web Analytics (OWA) distributed under the GPL license and free to use for anyone. This Open source web analytics software can be used to track and analyze the user behavior for websites and applications, just like the Google Analytics. Moreover, like the Google’s Analytics, it also provides a simple Javascript, PHP, or REST based APIs to track the traffic and other analysis of website & apps.

Also, for users ease, to track the popular content management systems or frameworks like the WordPress and MediaWiki; the OWA comes with built-in support for tracking such platforms.

Here we are going to show you how to install and set up the Open Web Analytics (OWA) on Ubuntu and CentOS:

Note: We are using the VPS server to install the Open Web Analytics (OWA).

First of all, log in as a root to whatever Linux system you are using to save your self from writing sudo in front of every command.

Step 1: Update the systems:

For REHL or Centos, run the command:

yum update

For Ubuntu or Debian based systems use the apt command:

apt-get update && apt-get upgrade

Step 2: Install the LAMP server on the Centos & Ubuntu

If you already have Apache, PHP and MySQL on your server then you can skip this step.

For Centos 7 & Centos 6:

As Centos 7 has dropped the MYSQL and adopted the MariaDB, so for Centos 7 users the MySQL package will automatically drop because of no availability but CentOS 6 user will get it.

yum install httpd php php-mysql mysql-server mariadb-server

For Ubuntu or Debian based systems

If you are using the Debian or Ubuntu or their based forks then use the below command to install the Web server including PHP and MySQL.

apt-get install apache2 php php-mysql mysql-server

Step 3: Activate, Enable and start the Apache and MySQL/MariaDB

For Centos 7:

As the Centos 7 uses the MariaDB, so here are the commands to enable and start both Apache and MariaDB.

Commands to enable & start MariaDB services

systemctl enable mariadb
systemctl start mariadb

Commands to enable & start Apache web server services

systemctl enable httpd
systemctl start httpd

For Centos 6 

Commands for MySQL to enable and start it.

chkconfig mysqld on
service mysqld start

Enable the Apache using the below commands

chkconfig httpd on
service httpd start

For Debian or Ubuntu based systems:

In Debian based Distros like Ubuntu for Apache & MySQL services use the following command:

service enable apache2
service enable mysql
service apache2 restart

Step 4: Securing the Database

Before going to next to create a database for our Open Web Analytics, we need to secure the MySQL by creating a password for its root user. By default, the user of MySQL or MariaDB is root without any password.

Note: As the MariaDB is a fork of MySQL and that’s why all below-given commands are true for both.

Use the command to set the password for MySQL/MariaDB for both Ubuntu and CentOS.

mysql_secure_installation

Step 5: Create Database for Open Web Analytics (OWA)

Before installing the Open web let’s create a database for it. 

      1. After setting up the password for MySQL/MariaDB root user, login with same using the below command:
        mysql -u root -p
      2. Now Create Database for OWA. You can give any name to it, however here we are giving “owatest“. Use the below command:
        create database owatest;
      3. Create a new Database user along with the password and assign it to the above-created database which in owatest in our case.
      4. Note: Replace the owatest with your database, owatestuser with the username that you want to give to a database user and owauserpassword with your own password that you want to assign to a database user.
        GRANT ALL PRIVILEGES ON owatest.* TO owatestuser@localhost IDENTIFIED BY 'owauserpassword';
      5. Exit MySQL
        FLUSH PRIVILEGES;
        quit

     

Step 6: Install Open Web Analytics

  1. Go to the web directory of your Apache web server using the following command.
    cd /var/www/html
  2. Now download the Open Web Analytics (OWA) for that first go to https://github.com/padams/Open-Web-Analytics/tags and click on the latest version. After that, you will see two compressed files zip and tar. Right click on the tar file and copy the link address.download the open wen analytics to install
  3. Now get back to Centos or Ubuntu terminal and type wget and paste the link which you copied and press enter:
    wget https://github.com/padams/Open-Web-Analytics/archive/1.6.2.tar.gz
  4. Once the OWA downloaded, its time to uncompressed the tag.gz. Use the command tar xf with the file name you downloaded. For example, the OWA file version we downloaded is 1.6.2 tar.gz then our command will be
    tar xf 1.6.2.tar.gz
  5. Rename the extracted folder to owa:
    mv Open-Web-Analytics-1.6.2 owa
    • NoteOpen-Web-Analytics-1.6.2 is our folder name after extracted and might be different in your case; if you are using some different version.
  6. After that assign its ownership to the Apache daemon user:
    • For Centos users the command will be:
      chown -R apache:apache Open*
    • For Ubuntu or Debian it is:
      chown -R www-data:www-data Open*

Step 7: Configure Open Web Analytics (OWA)

1. Open the browser and point it to http://example.com/owa/. Replace the example.com with your domain name or IP address of the server where you have installed the OWA.

2. You will get the following screen. Click on Let’s Get started

localhost owa

3. Now the Open Web Analytics will ask to enter the MySQL/MariaDB database details. Enter the one which we have created above in this article.

open web analytics database connection

4. If everything goes well then you finally see the Open Web Analytics Installer page asking for the Default Site and User information.

5. Enter the Site Domain which you want to track with the Open Web Analytics. After that the email and then password for Open Web Analytics Admin user.

Click on Continue…

Inkedopen web analytics installer_LI

6. Once the installation is successful and complete. The OWA will show the username and password that you can use to log in it.

7. Now Click on the Login and Generate a site tracker! button.

Generate tracking code

8. Now you will see your website domain name and just under that between a couple of options, there is one called “Get Tracking code” click on that.

Get the tracking code

9. Under the Get tracking code page: You will find two codes, one is Javascript and other PHP. You don’t need to use both it just depends on upon which you prefer. If you are using the WordPress based website then just copy the Javascript tracking code paste it after the <head> tag of the homepage, just like Google tracking code. You can even paste it in the footer if you don’t want it in the header of the website. The Open Web Analytics tracking API can also be got from this page.

copy paste the tracking code to your website html body

10. After implementing the tracking code on the website. Go to the Site Roster page and under the website domain click on the View reports option.

Step 8: Open web analytics dashboard

The Open web analytics dashboard will open and show your website metrics same like Google Analytics.

Open web analytics owa install dashboard

Open web analytics demo

Link to see the Demo of Open Web Analytics before installing it: DEMO

Open web analytics features:

  • Analytics dashboard.
  • Generates click heatmap.
  • View detail usage of web pages including prior and next pages viewed.
  • Visitor Geo-location.
  • Visitor Click-stream report
  • Track an unlimited number of custom site actions. Actions can be grouped and assigned values.
  • Track Feed requests, subscriptions and readers.
  • Optimize your SEO by tracking which search terms are referring visitors
  • See how loyal your visitors are by analyzing how often they visit.
  • Track clicks on all DOM elements on your web pages.

See: Openweb Analytics screenshot- Link

Other helpful resources:

1 thought on “How to install Open Web Analytics (OWA) on Ubuntu and CentOS”

  1. Hi, i feel that i saw you visited my website thus i came to
    return the favor?.I am attempting too in finding tings to improve my
    website!I aesume its good enough to use a few of your
    ideas!!

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.