Setup Ubuntu as a Web Server

So these are the general steps for setting up a web server (Apache, MySQL and PHP) on a Ubuntu server. If you are not sure on how to use unix command line see: http://www.leonardaustin.com/technical/ssh-commands

Install Apache MySQL and PHP

sudo tasksel install lamp-server
sudo /usr/sbin/apache2ctl restart

Install mod_rewrite

sudo a2enmod rewrite
sudo /usr/sbin/apache2ctl restart

You also need to find this file:

/etc/apache2/sites-available/default

and change “AllowOverride None” to “AllowOverride All” it appears a couple of times.

Install PHPMyAdmin

sudo apt-get install phpmyadmin

“In /etc/apache2/apache2.conf” Add “Include /etc/phpmyadmin/apache.conf”
The restart apache

sudo /usr/sbin/apache2ctl restart

Install XBedug – Optional for DEV only

sudo apt-get install php5-dev php-pear
sudo pecl install xdebug

# Make a note of the location of the xedebug.so then create a xdebug.ini with the below info and put it into “/etc/php5/conf.d”

; xdebug debugger
zend_extension="/usr/lib/php5/20060613/xdebug.so"
# IN php.ini file make sure html_errors = true
sudo /etc/init.d/apache2 restart

PHP Important Folder and Files

# /etc/php5
# /etc/php5/apache2/php.ini

Apache Important Folder and Files

# /etc/apache2/
# /etc/apache2/apache2.conf
# /etc/apache2/sites-available/default

Web Folder

# /var/www

Other Steps

Change php.ini errors to show all

Changing Plesk Fast CGI to Apache PHP with ZF

So recently I’ve had to change the php mode from Fast CGI to Apache Module in plesk due to the http authenticate functions in php not working. This caused my Zend Framework website to produce a 500 error, in my case it was something to do with:

Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'session has already been started by session.auto-start or session_start()

The reason for the error is that the session already existed from my first visit and CGI was the owner, when I changed it to Apache module apache did not have permission to change the session data. The solution, shut down your browser (or start a privacy mode) and then try and view your website. Everything should work fine afterwards.

How to Access PUT data in Zend Framework

So I have followed a few tutorials online on how to build a RESTful API in Zend Framework (http://mwop.net/blog/228-Building-RESTful-Services-with-Zend-Framework) and everything seemed to go swimmingly except when it came to retrieveing the PUT request data. Took me a while to find this however there is a controller plugin pre-built in Zend Framework that you have to enable (Zend_Controller_Plugin_PutHandler). Basically it add the PUT data into the standard request object so you can access the data via getParams() or getParam(‘var’).

For more information see:

http://framework.zend.com/manual/en/zend.controller.plugins.html#zend.controller.plugins.standard.puthandler

30 minutes until 30!

So 30 minutes until 30!

A list of things that I am appreciative of:

  1. Surviving surgery, when the odds where against me
  2. 11.21s for 100m
  3. Seeing the sun never set in Iceland
  4. My Friends
  5. Buying and renovating a house
  6. Winning a gold medal in an international Jiu-Jitsu competition
  7. The Power House
  8. My 1st class degree in physics
  9. Setting up a business
  10. Seeing and experiencing the awesome things in the world, for 10 months
A list of things that I haven’t done, yet:
  1. Got my motorbike licence
  2. Got my pilots licence
  3. Learnt to play the piano
  4. Make at least £1 million
  5. A black belt in any martial art
  6. Own an AC Cobra
  7. Acted or directed in a film
  8. Experienced fame
  9. Seeing the remaining awesome things in the world
  10. Changed to World
30 minutes well spent, Happy Birthday me!

Google Analytics Benchmarking Newsletter July 2011

Just clearing through my inbox and found Google Analytics Benchmarking Newsletter. This is exceptionally useful for most of my clients.

Google Analytics Benchmarking Newsletter
2011, Volume 1, July 2011
Google

1. Introduction

Welcome to the first volume of the Analytics Benchmarking Newsletter!

This month, we are replacing the standard “benchmarking” report in your Google Analytics account with data shared in this newsletter. We are using this newsletter as an experiment to surface more useful or interesting data to Analytics users. Data contained here comes from all websites which have opted-in anonymous data sharing with Google Analytics. Only those website administrators which have enabled this anonymous data sharing will receive this “benchmarking” newsletter.

You may be wondering, how many websites are in this “anonymous data sharing” pool? Currently, hundreds of thousands, and we’ve endeavored to make all of the metrics here statistically significant.

The date range of comparison for this newsletter is from November 1, 2010 – February 1, 2011. Comparison is done with data from November 1, 2009 – February 1, 2010. Absolute metrics such as total # visits, pageviews, or conversions for all opted-in websites are not reported.

To simplify the prose, the phrase “websites” will represent “websites which have opted into anonymous data sharing with Google Analytics” for the rest of this newsletter.

2. Site Metrics

Compared to a year ago, websites have seen reduced pages / visit, average time on site, as well as bounce rate.

 

11/1/09 – 2/1/10 11/1/10 – 2/1/11 Difference
Pages/Visit 4.9 4.5 -0.4
Bounce Rate 48.2% 47.0% -1.2%
Avg Time on Site 5:49 5:23 -0:26

 

2.1 Breakdown by Geography

Our anonymous database has aggregated geographic breakdown at the country level. Here are a few representative countries and their respective aggregate metrics. The first number in each cell represents the metric for the date range 11/1/10-2/1/11. The parenthesized number is the Year over Year delta compared to a year ago.

 

Country Pages / Visit Bounce Rate Avg Time on Site
United States 4.7 (-0.1) 42.5% (-6.1%) 6:06 (-0:10)
United Kingdom 4.9 (-0.3) 41.5% (+0.2%) 5:38 (-0.27)
France 4.4 (-0.4) 49.7% (+1.4%) 4:40 (-0:08)
Brazil 4.1 (-0.1) 47.8% (-2.9%) 5:20 (+0:03)
China 4.1 (-0.1) 58.2% (+1.0%) 3:46 (+0:37)
Japan 3.9 (-0.1) 48.6% (-9.0%) 3:47 (-2:59)

 

For bounce rate, the distribution by country is plotted below:

 

The distribution above is annotated with some countries — which seem to indicate a story of leisure and stage of economic development. For a related metric: average time on site, the distribution by country is plotted below:

 

The type of countries annotated in the average time on site graph above seem to be in reverse order as those in the bounce rate distribution.

2.2 Breakdown by Traffic Sources

Traffic sources below are identified by how the “source” and “medium”"” parameters are received by the Google Analytics collecting servers. Here is an article describing what these designations refer to.

 

Traffic Sources Pages / Visit Bounce Rate Avg Time on Site
Direct 4.0 (-0.5) 47.2% (-4.0%) 5:21 (-0:07)
Referral 5.0 (+0.1) 43.1% (-1.1%) 6:36 (-1:48)
Organic Search 4.9 (-0.1) 47.9% (-1.1%) 4:43 (+0:06)
CPC Search 5.6 (+0.0) 41.4 (-1.7%) 3:57(+0:07)

 

2.4 Conversion Rate Distribution

Many marketers’ favorite metric is conversion rate. Here is the worldwide distribution of Google Analytics “goal conversion rate” by country.

 

 

Would anyone have guessed that states which are known for conversions are also high for their citizens’ goal conversion rate? Note that for some states with few population, the statistical significance of the conversion metric comes into doubt.

3. Traffic Sources

Traffic sources below are identified by how the “source” and “medium” parameters are received by the Google Analytics collecting servers. Here is an article describing what these designations refer to.

 

% Visits from Sources 11/1/09 – 2/1/10 11/1/10 – 2/1/11 Difference
Direct 36.5% 36.8% +0.3%
Referral 21.0% 19.4% -1.6%
Search Engines 27.0% 28.0% +1.0%
Other 15.5% 15.8% +0.3%

 

4. Operating Systems

Browsers and Operation Systems (OS) are identified by the “referrer” string sent by users’ browsers.

 

% Visits from OS 11/1/09 – 2/1/10 11/1/10 – 2/1/11 Difference
Windows 89.9% 84.8% -5.1%
Macintosh 4.5% 5.2% +0.7%
Linux 0.6% 0.7% +0.1%
Other 5% 9.3% +4.3%

 

5. Comments

This is the first volume of our Analytics Benchmarking Newsletter. We hope that it provides useful insights. If you have specific comments or suggestions on how to improve this newsletter, please send your feedback to: analytics-benchmarking@google.com.

Happy analyzing,
Google Analytics Team

Pages:«1234567...13»

Twitter Updates