home | contact us
» » November


Many webmasters use Google Analytics to track their web traffic. This is a good idea and can be really useful in helping you to optimise your site and maximise your conversions.

However if your staff are constantly browsing your site, they will totally contaminate the data.

It is easy to block this though. All you need to do is add the following line to your HOSTS file

# [Google Inc]
127.0.0.1 www.google-analytics.com

Finding Your HOSTS file
The hosts file is located in different locations in different operating systems and even in different Windows versions:

  • Windows NT/2000/XP/2003/Vista: %SystemRoot%\system32\drivers\etc\ is the default location, which may be changed. The actual directory is determined by the Registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath.
  • Windows 95/98/Me: %WinDir%\
  • Linux and other Unix-like operating systems (including iPhone OS): /etc
  • Mac OS 9 and earlier: System Folder: Preferences or System folder (format of the file may vary from Windows and Linux counterparts)
  • Mac OS X: /private/etc (uses BSD-style Hosts file)
  • OS/2 and eComStation: “bootdrive”:\mptn\etc\
  • Symbian 1st/2nd edition phones: C:\system\data\hosts
  • Symbian 3rd edition phones: C:\private\10000882\hosts, only accessible with file browsers with AllFiles capability, most are not.

 

For a webmaster that relies on their site as their source of income, such as an ecommerce shop – it can be terrible to see the site become unavailable.. if no one can access your site then you won’t make any money!

However, sometimes its not that your site has gone down but that there is something wrong with your internet connection, your ISP or some higher level network problem that will affect some but not all of your sites visitors.

So next time your site goes down, visit this link and check to see if you site is down or its just you!


 

The latest version (1.7) of Magento has been released and features native support of a real enterprise level ecommerce feature: A-B or Multivariate testing.

This involves presenting slightly different versions of pages to portions of web traffic and then monitoring the effectiveness of each version. This method then allows you to fine tune your site to maximise conversions and ultimately turnover.

The release also includes native Google Base integration meaning you can upload your product catalogue to Google’s Base system (most usefully used in Google Product Search – A.K.A. Froogle).

These kind of hard hitting features really cement the fact that investing into a Magento based ecommerce platform is not just a sound decision for right now, but also a sound long term tactical decision for an ecommerce business.

There is probably no bigger decision you will make as a start up ecommerce business than which platform to invest in. Should I go for a paid for package? Should I go for the tried and tested package? Should I go for a hosted package?

I think the answer is becoming more and more – go for Magento!

More Info
Magento
Google Website Optimizer
Google Website Optimizer New Features


 

Looking forward to going to the PHPNW conference this weekend!

Maybe next year I’m going to go over the states for the Zend conference, but this will do for now :-)


 

When creating Javascript, it can be useful to alert out the values of various strings or arrays. You can also use this to confirm if certain parts of loops or if statements are being reached. However – having loads of alert statements in your Javascript can be messy and time consuming to manage.

For this reason I use this Javascript debug function. I use a PHP variable $debug to control whether or not this Javascript debug function outputs anything or not. If enabled, it will create an alert with info on the variable, array or whatever that has been passed to it.

If the $debug PHP variable is not set to true, the dbug function simply returns as soon as it is called – does nothing basically.

Here is the Javascript function

// for debugging only
function dbug(arr,level) {
	<?php 
	if(!$debug){
		echo 'return;';
	}
	?>
	var dumped_text = "";
	if(!level) level = 0;

	//The padding given at the beginning of the line.
	var level_padding = "";
	for(var j=0;j<level+1;j++) level_padding += "    ";
	if(typeof(arr) == 'object') { //Array/Hashes/Objects
		for(var item in arr) {
			var value = arr[item];
			if(typeof(value) == 'object') { //If it is an array,
				dumped_text += level_padding + "'" + item + "' ...\n";
				dumped_text += dump(value,level+1);
			} else {
				dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n";
			}
		}
	} else { //Stings/Chars/Numbers etc.
		dumped_text = "===>"+arr+"<===("+typeof(arr)+")";
	}
	alert(dumped_text);
}	

To use the function, first of all (assuming you are using PHP) you need to declare the $debug variable at the top of your script and set it to true:

<?php
$debug = true;

Then in your Javascript simply use dbug(var) whenever you want something outputted.

For example:

//Calling the function...
function init() {
var arra = new Array("Hloo",'s',23,23.1,"Hello World");
var assoc = {
 "val"  : "New",
 "number" : 14,
 "theting" : arra
};

dbug(assoc);
}

This was adapted from the Dump function available here


 

Check out this huge list of online business tools!

http://mashable.com/2008/09/21/270-online-business-tools/


 

There is a lot of buzz at the moment surrounding VPS hosting. For those of you who are not familiar with VPS, or virtual private server hosting – it is similar to shared hosting in that you are sharing a physical server with other web sites. The big difference is that with a VPS, you are not sharing the operating system with those other sites.

To clarify this. Think of your desktop PC and think of web sites as separate windows running Word for example (this is just to illustrate the idea). Each instance of Word is a separate entity but they are all running on the same instance of windows and are all running on the same machine. There are some security issues with this idea, for example someone elses instance of word might be able to get access to your folder with your files in it.

On a VPS, there is only your instance of word running in your instance of windows. And only you can access your files. From your point of view, the VPS operates exactly as if it was a dedicated server. You have total control over every single bit of the operating system and can install whatever software you wish and make any changes that you would like.

Also – VPS solutions tend to offer better protection against the physical server resources being hogged by one particularly demanding account at the cost of all the other accounts on the server. Instead on VPS systems, the resources are more rigidly shared out meaning that you have a guaranteed minimum level of performance that can not be degraded no matter how hard other VPS’s on the physical server are being used.

This all sounds great, and for many people it is. However there is a big BUT…

The drawback with VPS hosting is in the support. Often these VPS accounts are available very cheaply and when they are working they can work really well. The problem arises when they stop working. You go to the hosting company and ask them why the server has stopped working and they tell you that they do not support the software and its your responsibility to sort it out.

At this point, the average person who just wanted a hosting environment for their web site and is not an experienced systems administrator can come really unstuck because you simply might not be able to fix the problem.

With dedicated server hosting, many hosts offer something called Managed hosting. This is where you not only get the machine but you also get a full support service and ongoing management to keep the machine up to date with the latest patches and security updates and also get the machine up and running again should there be any problems. If you can afford this kind of service then I highly recommend going for it, but it is significantly more expensive than VPS hosting.

So to conclude, if you do not regard yourself as an experienced systems administrator then I would highly recommend you double check the level of support offered with the VPS before you sign up for it. For UK based readers, I would especially recommend avoiding web fusion VPS servers.

If you need any help finding a suitable hosting solution for your online business – get in touch today.


 
rss icon