Thursday, February 02, 2006

Installing and Configuring phpMyvisites

In my previous post I have mentioned about phpMyvisites.

Here I have Documented the Procedure I followed for
phpMyVisites Installation.

Steps For Configuring PhpMyVisites :

1) Untar the phpmyvisites_2_1.zip inside your Webserver Folder

2) Create the database with the required Permissions :

[root@mybox phpmv2]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8 to server version: 4.0.15

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database phpmyvisites;
Query OK, 1 row affected (0.08 sec)

mysql> GRANT ALL PRIVILEGES ON phpmyvisites.* TO phpmyvisites@localhost IDENTIFIED BY 'phpmyviites';
Query OK, 0 rows affected (0.29 sec)

3) Make sure you have GD Library Insatlled :
IF not, you cab download it from here

http://www.boutell.com/gd/


4) Follow the Installation from the Web Browser

I have Untarred it in PhpMyVisites inside my Web Folder

5) Set The permissions for the PhpMyVisites Directory to Writable.

6) Follow the 9 Steps given From Browser

http://localhost/phpMyVisites/phpmv2/

7) Now in the 5th Step of your Web Browser Installation You will
see General Setup - Please Take note of this Information

For Eg
Super Administrator login - sriram
Super Administrator password - sriram123

Note Passwords must contain Numbers

Receive an email each day per website containing statistics summary? Yes

8) In Step 7 you will need to add your site for which you want to Counter

Have to Fill the Following in Step 7

Site Name

Site main URL

Show the logo on your pages?
By allowing the display of the logo on your site, you will help publicize phpMyVisites and help it evolve more rapidly. It would also be a nice way to thank the authors who have spent many hours developing this Open Source, Free application.

Record GET variable? (URL variables) - Record ALL URL variables

9) Step 8 shows the Javascript code that you need to embed in to your site

Display Javascript code

To count all visitors, you must insert the javascript code on all of your pages.
Your pages do not have to be made with PHP, phpMyVisites will work on all kinds of pages (whether it is HTML, ASP, Perl or any other languages).

Here is the code you have to insert: (copy and paste on all your pages)

The Detailed Code will be Given you need Copy and paste the Javascript in the Index page.

Tips for advanced users (these tips will be integrated in a future documentation)
Classify pages into groups

This is VERY useful for huge WebSites with content separated into categories. As you can see on phpMyVisites online demonstration, you can classify your pages into groups. You browse the groups and pages very easily in the phpMyVisites interface in the "Pages view" part. To do this, it is very simple (thanks to phpMyVisites supreme power)

You have 3 working modes :

- automatic : if your website is physically structured with directories, phpmyvisites will detect them and class your pages into groups (named as your site directories)

- manual : if you don't have directories, for example if all your pages call "index.php" with different variables, you can set up a virtual page name and assign its value to the Javascript variable "pagename", separating the groups with the character slash "/"
pagename = 'group1/subgroup1/infinitegroup/hello_kitty';


You can also set up a semi-automatic pagename using the HTML value of the TITLE markup (but there won't be group hierarchy)
pagename = document.title;

Count files download and/or URL clicks

If you want to count file downloads, or URL clicks, it is very simple. You have to change your URLs with the pattern :
http://PATH_TO_YOUR_PHPMYVISITES/phpmyvisites.php?url=URL_WHERE_TO_REDIRECT&id=ID_SITE&pagename=FILE:NAME_OF_FILE

Note that the string "FILE:" is mandatory! If you don't put this string, it won't work

For example, if you want to set up a Google url click count, instead of linking to "http://www.google.com", you will link to
phpmyvisites.php?url=http://www.google.com&id=1&pagename=FILE:google click count
Or if you want to count the files download (this link will redirect to "http://www.download.com/phpmyvisites.zip")
phpmyvisites.php?url=http://www.download.com/phpmyvisites.zip&id=1&pagename=FILE:phpmyvisites_last_version
A super tip

You can classify Files download, URL count, into groups! As you can for the classic pages. It allows to have a very precise report, well organized

For example this will word
phpmyvisites.php?url=http://download.com/phpmv.zip&id=1&pagename=FILE:files download/phpmyvisites/last release

The "File" will be classified into the groups files download/phpmyvisites/
Good luck with phpmyvisites!

If you're happy with it, don't hesitate to make a little donation, it helps us a lot :-) See on the official website for more information

Go to next step > Takes you to Finished Page.


That's all !!!

Analysing Web traffic with phpMyVisites

Any Web site owner knows the value of traffic statistics, but finding the right Web statistics package is not as easy as it may seem. Of course, there are excellent packages such as AWStats, Modlogan, and Webalizer, but these applications are overkill for people running smaller Web sites. Moreover, you can't install them if your Web hosting provider doesn't allow you to use custom scripts. If you are in the market for an easy-to-use program that provides essential Web traffic information, you might want to take a closer look at phpMyVisites.

The phpMyVisites installation script does all the dirty work for you, unlike many PHP/MySQL-based applications, which often require you to gather information and tweak configuration files manually. According to phpMyVisites, the installation procedure consists of nine steps and takes about 10 minutes. In reality, it's possible to perform the installation procedure even faster.

Download the latest version of phpMyVisites, unpack it, and copy the phpMyVisites folder (called phpmv2) to your Web server.

Point your browser at http://yourserver/phpmv2/ to begin the installation procedure. The phpMyVisites installation script starts by checking your server and database configuration, and presents the result as an easy-to-understand report.

Next, it prompts you to enter your MySQL database name and login info, which the script uses to connect to the database and populate it with the necessary tables. That's all there is to it. All you have to do now is to create an administrator account that will allow you to manage phpMyVisites as well as add and configure the Web site(s) you want phpMyVisites to monitor. Once you have done this, copy the provided JavaScript snippet and paste it into every page on your Web site.

phpMyVisites features

Now, let's take a look at what phpMyVisites has to offer. The Administration panel allows you to configure phpMyVisites' settings. Besides the usual stuff like server info, user management, and general settings, there are a couple of rather clever features. For example, you can configure phpMyVisites to send you or any other user daily email messages containing Web statistics, or you can view statistics using phpMyVisites' RSS feed. phpMyVisites also allows you to exclude a range of IP addresses and your own machine from being counted.

Let's say you maintain a newsletter and you want to know how many readers actually visit your Web site. With phpMyVisites you can do that by specifying the newsletter in the Administration section and using a special URL in the newsletter itself. If you cooperate with other sites, you might want to know how many visitors they sent to your Web site.

phpMyVisites can help you track visits from a partner's Web site -- just add the partner in the Administration panel.

This article was taken from here