Friday, October 25, 2013

How To Set Up Google Content Experiments in Magento 1.7

I spent a lot of time looking around for a way to conduct Google Analytics Content Experiments in Magento with very little success. I did find this post in Finnish that detailed one approach and I adapted his findings (with the help of Google Translate) in to the following solution.

Step 1 - Set up your Content Experiment code block
In CMS > Static Blocks add a new static block with an easy to identify name such as "Google Content Experiments Code" and an identifier such as "google_code_block". Paste the Content Experiments code in to the wysiwyg editor by pressing the HTML button and pasting the code in to the pop up window. Click "update" and the window will close but you won't see anything appear in the wysiwyg window. This is normal.Make sure you enable the code block and save it.

Step 2 - Alter your template to write the code block
In your app\design\frontend\default\yourtemplate\template\page\html\head.phtml file add the following code right at the top after meta charset="UTF-8"


<?php  $routeName = Mage::app()->getRequest()->getRouteName();
$identifier = Mage::getSingleton('cms/page')->getIdentifier();
if($routeName == 'cms' && $identifier == 'home') {
echo $this->getLayout()->createBlock('cms/block')->setBlockId('google_code_block')->toHtml();
} else {

}?>

If you are performing an experiment on a page other the home page you will need to change the $identifier string to match your page identifier which is your URL key. You will also need to change the Block ID if you have called your code block something different.

Step 3 - Disable the code block on your variation pages
Set up the variations of your CMS page and in the Layout Update XML part of the Design tab paste the following XML code:
<reference name="head">
<remove name="google_code" />
</reference>

This will stop the code block from loading on the variation pages as per Google's instructions.

Step 4 - Verify it all works in Google Analytics!
Check it all works in GA and start your experiment.

I've yet to work out a way to perform experiments on category pages without creating a brand new category containing the same products.

Tuesday, November 20, 2012

Proof that Google Plus Helps Rankings

A couple of months ago I re-developed a site for my Dad's knitting business, Tandy Knitting Wools, to complement his eBay shop. We'd launched a site a few years previously but were having problems keeping stock up to date between eBay and his own website and the bricks and mortar shop so we closed the e-commerce site for a while. We launched the new Magento-based site in September and I waited a while for Google to do it's thing and assign us some rankings. I built a few links, posted a few things on Facebook, Twitter, a Google Plus post, etc. and slowly the rankings climbed to around the 50s - 80s mark for most of the keyphrases I was keeping an eye on and settled there. Obviously the site was in need of a boost up the rankings but how? After Penguin and Panda the old ways of building links were no good to me and spending time writing and publishing articles wasn't really practical so I decided that social media was the best way to increase not only rankings but conversions and to draw new customers in. My first step had a dramatic effect on rankings... The site went from ranking in the 60 - 80 region to top 10 in just 6 days!

So, what did I do that had such an effect? Well it's extremely simple, I set up a Google Plus page for the site. All I added was the site's URL, the shop's physical address,  phone, and email address and logo. Nothing else, no photos, no videos, no posts on the page. The page isn't even verified yet (waiting on the postcard) and the rankings went rocketing upwards.

Cygnet DK Wool went from 40 to 8, Cygnet DK went from 15 to 4, King Cole Big Value Chunky from 82 to 14, Krystal Wool from 52 to 11, Wondersoft Wool from 70 to 18 and many more! All this just by spending 5 minutes signing up for a free Google Plus page. Today I've linked the site to the Google Plus page using the rel=author and rel=publisher attributes so we'll see what effect that has on rankings.

Thursday, October 04, 2012

Quickly Add Open Graph tags to Magento

A clinet of mine recently shared the site report for her site from Silktide with me and it showed a few things needed improving, particularly the Open Graph integration. Her site is a new Magento store, built on Magento Community Edition 1.7.02 and whilst I'd added share buttons to the product pages via the ShareThis widget I hadn't added in any Open Graph tags to optimize the sharing process. The Silktide report spurred me in to action and I thought I'd share my code to quickly add the OG tags to your magento pages.

First you'll need to edit your theme's head file at "app\design\frontend\YOURTHEME\default\template\page\html\head.phtml" and add the following lines of code:

<meta property="og:site_name" content="<?php echo Mage::app()->getStore()->getGroup()->getName(); ?>" />
<meta property="og:description" content="<?php echo strip_tags(htmlspecialchars($this->getDescription())) ?>" />
 

<?php if (!in_array(Mage::app()->getFrontController()->getAction()->getFullActionName(), array('cms_index_noRoute', 'cms_index_defaultNoRoute'))) {
    $currentUrl = Mage::helper('core/url')->getCurrentUrl();
}?> 

<meta property="og:url" content="<?php echo $currentUrl ?>" />
 

<?php if (Mage::registry('current_product')) : ?>
<?php if (Mage::registry('current_product')->getMetaTitle() == "") {
  $ogTitle = Mage::registry('current_product')->getName();
} else {
  $ogTitle = Mage::registry('current_product')->getMetaTitle();
}
?>
<meta property="og:title" content="<?php echo $ogTitle ?>" />  

<meta property="og:image" content="<?php echo Mage::helper('catalog/image')->init(Mage::registry('current_product'), 'small_image')->resize(200,200);?>" />
<?php endif;?> 



This code is mainly aimed at product pages and sharing them on Facebook so it renders the product's title, description and a thumbnail image of the product, resized to the recommended size of 200 pixels square. Any HTML in the description is stripped out leaving the plain text. The code also adds the current store view's name (you may need to edit this in Configuration > Manage Stores) and the URL of the current page. Finally the code checks if the product has a Meta Title set and if not it displays the name of the product instead. Upload the altered file, clear your Magento cache and away you go. You can check your integration with the Facebook debugger tool.

UPDATE
The code below checks if we're on a product or category page and pulls the relevant image and sets the correct og:title for the category or product page.

<?php if (Mage::registry('current_category')) : ?>
<?php $ogTitle = Mage::registry('current_category')->getName();?>
<?php
$_category  = Mage::registry('current_category');
$cur_category = Mage::getModel('catalog/category')->load($_category->getId());
$imageUrl = $cur_category->getImageUrl();
?>
<meta property="og:image" content="<?php echo $imageUrl;?>" />
<?php endif;?>
<?php if (Mage::registry('current_product')) : ?>
<meta property="og:image" content="<?php echo Mage::helper('catalog/image')->init(Mage::registry('current_product'), 'small_image')->resize(200,200);?>" />
<?php endif;?>
<meta property="og:title" content="<?php echo $ogTitle ?>" />

I still haven't found a way to get all the product images but it will be necessary to loop throught the product image array and write out an og:image tag for each image.

Tuesday, August 28, 2012

5 Essential Magento extensions for UK shopping sites.

I've been spreading my wings lately and offering low cost e-commerce solutions using Magento Community as the base for websites. Magento Community is a fine piece of software with a mind-boggling array of features and options but it does lack certain abilities that make it a truly great product. Thankfully due to the open-source nature of Magento there are plenty of extensions available to make Magento do what you want it to do.

Yoast MetaRobots
This exension by the respected Yoast (known for his excellent WordPress SEO extension) allows you to control the Meta Robots tags quickly and easily on a variety of pages on your Magento site to help direct the flow of "link juice" around the site and prevent pages from being indexed. Yoast MetaRobots allows you to set pages such as Send to a Friend, Customer Account pages, Tags and Checkout as "noindex, follow" from a simple panel in the System > Configuration  > Web section of Magento's administration area.

MSemantic
Now that Google (and Bing to a lesser extent) are really pushing Rich Snippets as an important part of your site's content it is imperative that your Magento site implements semantic markup for Rich Snippets for Google and Bing. The MSemantic extension takes away all the pain of marking up your site with a simple to install extension. Once installed your products and reviews contain the correct markup for Rich Snippets integration which will help with your rankings and visibility in Google, Google Shopping and of course Bing.

Google Content API for Shopping
The only way to get your products listed on Google Shopping if you use Magento. Simply install the extension, add your Account ID, Google Account Email Address and Password and then upload your selected products to Google. You can configure the extension to automatically update the product listing on Google if you change the product in any way and it's easy to see what products you have listed and what needs adding. The extension also supports custom attributes and the full range of Google Shopping taxonomies.

Meanbee Royal Mail Domestic and International Shipping
This simple to use extension adds the current Royal Mail shipping costs to your Magento store and works out the correct postage cost based on location and weight. My 2 qualms with this extension are you can't add the cost of your packaging materials to the shipping rates so you would have to add a bit extra on to each product's cost or define a shopping cart rule to get a more accurate cost and the extension does not take the packet's dimensions in to account as it's based purely on weight. Otherwise this extension is fantastic and a really simple way to set up Shipping Table Rates in Magento for UK users.

Clever CMS
Magento's Content Management System is a bit... well, basic to polite, but Magento is primarily an e-commerce solution not a fully featured CMS. Clever CMS extends the basic Magento CMS with some great additions that I feel are essential to any good CMS. Clever CMS allows you to assign permissions to your pages so you can decide who sees your pages (logged in customers, not logged in customers, etc.) and more importantly creates a tree structure for your pages similar to Magento's category tree structure so you can create sub pages and rearrange your menus at will and each store view can have it's own "tree". You can define your own URLs and if you change them at a later date then Clever CMS will set up a 301 redirect from the old URL to the new one.

Wednesday, May 16, 2012

Is Google removing free directories from it's index?

This is my first post in a long time on my often neglected blog and I thought I should come back by answering a question a lot of people have been asking on the SEO forums and sites recently, "is Google removing free directories from it's index?" Barry Schwartz highlighted the issue over on Search Engine Round Table and claimed that over 50% of the directory sites he checked had been de-indexed. Search News Central followed that up with a test of over 400 directories and found that just over 1% had been de-indexed. I used to use a lot of free directory submissions when I was starting out and built up quite a list of directories that I knew were good for a link, would show up on Google and were regularly crawled. I checked this list of just under 200 directories to see if any had been deindexed and the results were... underwhelming. Out of 191 sites 2 were no longer online so had been de-indexed, 4 were still active but had been de-indexed due to server errors or just plain crap coding or set up and 1 had only the home page indexed. The rest were fine. So in short the answer to the question above is... no.

It may be that after the Penguin update that these free directories are no longer passing as much or any link juice as before, it may be that these sites are fine. As I said earlier this list is a hand-crafted list of free directories that have been proven to work pre-Penguin, post-Panda and long before that. So is Google removing quality free directories? No, but it might be removing the crap ones and about time too.

Thursday, October 27, 2011

Removing Voltrank Increased My Rankings

Following on from my recent post about Voltrank's ineffectiveness at increasing rankings I thought you may be interested to know what effect that has had on rankings. A week on from deactivating and uninstalling Voltrank my rankings for my entire site have shot up considerably. I mentioned 2 target phrases in my original post and for the the first of these, "bra measuring guide," my site is not firmly in the top 10 of Google UK and for the second, "lingerie guide," the page is hovering around postion 15 or 16. Rankings across the site have improved immensely for many of the keywords I'm tracking for the site with a few top 10 and top 20 results just a week after being nowhere in the top 200! I am aware that some of this boost may be coming from the links I placed in my previous post but that wouldn't really explain the site wide jump. I mean this blog isn't exactly popular so there's very little link juice flowing around. I think this just reinforces that my experience with Voltrank was bad. To back this up, here's a screen shot from my Google Analytics account for this site:

Yep that's five fold increase in traffic after the site was re-ranked. Yes it's only 14 or 15 a day but it's a lot better than 2 a day!

Friday, October 21, 2011

Free Link Exchange Programs That Don't Work - Linkalizer

In the second post in my series of Free Link Exchange Programs That Don't Work I'm looking at Linkalizer. I'd like to start by pointing out that it's been a few years since I actively used Linkalizer as I realized a while ago that it was crap! I checked my records and I signed up in 2007. It may have changed in the last few years but by looking at the website I'd say it hasn't! One quick glance through the Link Exchange Directory on the site (where all sites that join Linkalizer are listed) shows us that there is very little care or attention put in to this system. Looking at the Arts section of the directory shows us that Linkalizer is full or spam and misfiled sites. There's a Nigerian Job Centre site, Google Classified Ads site, NTFS data recovery, college party tips, Warcraft sites, a technology new blog, corsets site, the obligatory Vietnam travel site and "Medical tourism in India" all on the first page of the Arts directory. This tells us the sites aren't being reviewed and anyone can join. I tested a handful of links from various pages in the directory on Yahoo! Site Explorer and none of them showed a backlink from Linkalizer's directory so it's not even worth joining for a free followed link from their directory as it will never be counted!

Linkalizer is a simple link exchange system, you link to someone else's site and they will link back to you. Free members can send a limited number of link requests per day and respond to incoming requests. Members can search the directory and request links from any site in any category. Unfortunately this means you will be inundated with link requests from poor quality sites, unrelated sites and makes finding the good sites even harder. The directory lists the PageRank for each site (because that's such a reliable metric...) and a link to the Alexa data for the site so if you want to find any good sites you're going to have to do some serious digging with 3rd party tools. You can't search the directory, only browse the listings which makes finding link prospects even more time consuming.

As I said before it's been a few years since I used Linkalizer and maybe if you were determined enough and did enough analysis of your link exchange prospects you could get some strong backlinks from this system but you would spend most of your time in the dashboard rejecting link requests from spammy sites. If you are looking for sites to exchange links with then avoid this system and stick to looking for link exchanges manually.

Don;t forget to check out part one of this series, our review of Voltrank.