Archive for April 5th, 2009
Average Time on Site 0:00
I recently discovered why Google Analytics lists so many visitors with Average Time on Site 0:00.
Average Time on Site is calculated by subtracting time stamps between page views on your site. So if a visitor views one page and leaves (indicated by Bounce Rate 100%), there is no second page view to calculate the Average Time on Site. Google Analytics automatically assigns a time 0:00 for that visitor.
Some people have asked, “Why not just run a javascript timer on the site and ping the google analytics server every X interval?” The answer is because Javascript programs consume resources. Web analytic js scripts should not interfere with the operations of native web applications. (I am very suspicious of ClickTale because it records all user activity on a site. Do ClickTale operations interfere with the functionality DHTML rich web applications?)
**Reference: Bounce Rate and Time on Site - Google Forum Thread
GST Number vs. Business Number
It took me a while to realize that the GST number is the same as the Business Number. I post an excerpt from the FAQ of the CRA here because government sites are none for their infamous 404 errors:
——
4. Where can I find the GST/HST number?
The GST/HST number (also referred to as a Business Number or registration number) must be displayed on receipts, invoices, and contracts totalling $30 or more.
5. Why are only 9 numbers required, when the GST/HST number has 15 characters?
For the GST/HST Registry, only the first 9 numbers need to be entered. Do not include letters.
PHP5 on 1and1
To enable PHP 5 on a 1and1 shared web hosting linux package, simply create (or edit) a file with the name .htaccess on your server and add the following line:
AddType x-mapp-php5 .php
This will make all php files in subdirectories rendered as php version 5.
Install phpMyAdmin on 1and1
You can install your own instance of phpmyadmin on your 1and1 shared hosting package. The advantage of this approach is that you can share access to a single database with other users without having to give them credentials to access your 1and1 backend. To accomplish this, follow the procedure below:
- Download a copy of phpmyadmin.
- Unzip the contents of your new download.
- Create the directory you wish to host the phpmyadmin on your 1and1 webserver (eg. http://yourwebsite.com/phpMyAdmin/)
- Use the 1and1.com backend controls to password protect this phpmyadmin directory (found under Web Access>Protected Directories).
- Use the following code in your config.inc.php, but replace the database host, database username, database password and database name with the appropriate values:
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki <http://wiki.phpmyadmin.net>.
*
* @version $Id: config.sample.inc.php 12304 2009-03-24 12:56:58Z nijel $
*/
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = ”; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
$cfg['PmaAbsoluteUri'] = ‘http://yourwebsite.com/phpMyAdmin/’;
$cfg['Servers'][$i]['host'] = ‘db_host’; // something like db909ds.perforanet.net
$cfg['Servers'][$i]['auth_type'] = ‘config’; // 1and1.com uses ‘config’ as opposed to ‘cookie’
$cfg['Servers'][$i]['user'] = ‘db_user’; // something like dbo909809
$cfg['Servers'][$i]['password'] = ‘db_pass’;
$cfg['Servers'][$i]['only_db'] = ‘db_name’; // something like db909809
/* Server parameters */
$cfg['Servers'][$i]['connect_type'] = ‘tcp’;
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = ‘mysql’;
/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = ‘pma’;
// $cfg['Servers'][$i]['controlpass'] = ‘pmapass’;
/* Advanced phpMyAdmin features */
// $cfg['Servers'][$i]['pmadb'] = ‘phpmyadmin’;
// $cfg['Servers'][$i]['bookmarktable'] = ‘pma_bookmark’;
// $cfg['Servers'][$i]['relation'] = ‘pma_relation’;
// $cfg['Servers'][$i]['table_info'] = ‘pma_table_info’;
// $cfg['Servers'][$i]['table_coords'] = ‘pma_table_coords’;
// $cfg['Servers'][$i]['pdf_pages'] = ‘pma_pdf_pages’;
// $cfg['Servers'][$i]['column_info'] = ‘pma_column_info’;
// $cfg['Servers'][$i]['history'] = ‘pma_history’;
// $cfg['Servers'][$i]['designer_coords'] = ‘pma_designer_coords’;
/*
* End of servers configuration
*/
/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = ”;
$cfg['SaveDir'] = ”;
?>
And that is it. The only difference between this config.inc.php and the default config.sample.inc.php that comes with phpmyadmin are the following 6 lines:
$cfg['PmaAbsoluteUri'] = ‘http://yourwebsite.com/phpMyAdmin/’;
$cfg['Servers'][$i]['host'] = ‘db_host’; // something like db909ds.perforanet.net
$cfg['Servers'][$i]['auth_type'] = ‘config’; // 1and1.com uses ‘config’ as opposed to ‘cookie’
$cfg['Servers'][$i]['user'] = ‘db_user’; // something like dbo909809
$cfg['Servers'][$i]['password'] = ‘db_pass’;
$cfg['Servers'][$i]['only_db'] = ‘db_name’; // something like db909809