Browsing articles in "Technical"

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

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

Install APC on Xampp

This is how I installed APC on Xampp on Windows 7

  1. Download php_apc-3.1-svn20101116-5.3-vc6-x86.zip (Direct link : http://downloads.php.net/pierre/php_apc-3.1-svn20101116-5.3-vc6-x86.zip)
  2. Copy php_apc.dll to C:\xampp\php\ext
  3. Open php.ini (C:\xampp\php\php.ini) and add extension=php_apc.dll

I also needed to change a couple of settings inside apache.

  1. Go to the directory of installation\apache\conf
  2. Open and edit httpd.conf in a text editor
  3. Find all occurrences of
    AllowOverride None

    and change to

    AllowOverride All
  4. I think it appears 2 or 3 times on the configuration file.
  5. Reset Apache

Should work for you as well.

Sagepay Test Card Details

Whenever I need to test Sagepay (ex Protx) payment gateway integration I have to try and retrieve the test card numbers I can never find the correct pdf. This means trying to find them on Google (which I never can) or loggin into sagepay and downloading about 3 pdfs before I find the right one. So to save me and others time here see below:

Card Type          - Card Number      - Issue - CV2 - Address - PostCode
Visa Credit        - 4929000000006    - 123   - 88  - 412
MasterCard Credit  - 5404000000000001 - 123   - 88  - 412
Visa Debit / Delta - 4462000000000003 - 123   - 88  - 412
Solo               - 6334900000000005 - 1     - 123 - 88      - 412
UK Maestro         - 5641820000000005 - 01    - 123 - 88      - 412
American Express   - 374200000000004  - 123   - 88  - 412
Visa Electron      - 4917300000000008 - 123   - 88  - 412
JCB                - 3569990000000009 - 123   - 88  - 412
Diner’s Club       - 36000000000008   - 123   - 88  - 412
Laser (LASER)      - 6304990000000000044 - 123 - 88 - 412

Any cardholder name and start/expiry dates will be accepted for these cards so long as the dates are valid and the card not expired. If you have 3D-Secure set up on your test account, you can use the My Sage Pay Admin interface to switch on the checks at this stage to test 3D-Secure.

Share Folders on Unbuntu VBox with Windows

These instructions assure you are using Windows as your host and Ubuntu as the client machine. I am using vbox 4 and Ubuntu 10.04 LTS. I had loads of issues getting this to work with other tutorials and forum posts. I kept getting errors like:


/sbin/mount.vboxsf: mounting failed with the error: Protocol error
/sbin/mount.vboxsf: mounting failed with error: No such device

Here is my method which worked for me and hopefully for you as well.

Stage 1. Install Guest Additions. If you have done this already skip this stage.

  1. Start Ubuntu and click devices in the vbox window, the select install Guest Additions
  2. This should put a cd icon on the Unbuntu desktop, double clicking should open a folder.
  3. Click “Open Autorun Prompt” then wait for it to install.
  4. Shut down Ubuntu from within the client.

Stage 2. Add the shared folder

  1. Open up VirtualBox control panel.
  2. Right hand click on the box you want to share a folder with
  3. Go to share folder, add a folder and tick Auto-Mount and Make Permanent
  4. Click OK and start your Ubuntu vbox

Stage 3. Give Your User Permission

  1. You need to add your user to the vboxsf group.
  2. Click system->administration->Users and Groups
  3. Click Manage Group -> scroll down, scroll down and click vboxsf. Then click properties.
  4. There should be a list of Group Memebers, make sure your user is clicked (by default your user will be called Ubuntu).
  5. Close everything and restart from within Ubuntu, not vbox control panel.

Stage 4. Done

  1. Once Ubuntu starts your shared folder can be found in “File System/Media/”

Twitter Updates