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 !!!

No comments: