Blogs
On Saturday our close-knit team got a big step closer. At 6 pm Andrew and Kathryn said "Yes" in San Antonio, Texas. Michael and myself had the honor to represent the team in a romantic and tearful wedding ceremony at the Gardens at West Green. Andrew and Kathryn McClintock - the Amazee team wishes you a marriage full of eternal love and happiness.

Here you go. These are the five items that got our attention in the last seven days.
Technology
LukeW: Data Monday: Mobile Holiday Shopping
This blog post provides some interesting facts regarding the usage of mobile devices and e-commerce during the Thanksgiving and Black Friday period.
Drupal
Dries Buytaert: Drupal 8 feature freeze extended
In last week's edition we mentioned that Drupal 8's feature freeze was only days away but this week the deadline was extended. Drupal founder Dries Buytaert explains the reasons in this blog post.
SEO
Amazee Labs: Drupal SEO Checklist for 2013
Allow us to make a bold claim: This will be the only Drupal related SEO checklist you will require for a while. Follow the forty steps to rejuvenate your website's search engine appearance.
Respsonsive Web Design
.net magazine: Guardian dev's insight into RWD revamp
The Guardian, a British national daily newspaper, is the latest responsive design poster boy. Client-side web developer Matt Andrews talked to .net magazine about the project - which currently still is in beta status.
Little helpers
Microjs
This site provides a collection of JavaScript frameworks and libraries which looks like promising resource.
The SEO environment has changed significantly during the last 18 months, especially after the Panda and Penguin updates. What worked a couple of years ago, is just not relevant anymore. Before those updates, it was much easier to achieve high rankings in search engines just by building or buying links from low quality sites. Post-penguin SEO requires a more holistic approach, with focus on quality content but also requires a technical perfection.
But, Drupal is already SEO friendly; you are going to answer. Of course it is, but that does not mean that it is perfect right out of the box, but that it has the flexibility to become a SEO-perfect platform. A plain Drupal installation does not provide everything that is required so, here are the basic steps to optimize it to the last detail.
Planning
- Begin with the Search Optimization planning, before beginning to build the site. The development of the website is the not the final destination after all, it’s just the medium for the creation and promotion of site’s content.
- Do your keyword research to understand what people are looking for and how you can help them to find it. Plan your site architecture, hierarchy and layout based on your findings. Use the Keyword Tools from Google or Bing. For a more advanced tool, use KeywordSpy (paid, with a free trial).
Setting up Drupal
- Create a redirect between the www and the non-www version of your site. If you don’t, search engines will index both versions and you will have a duplicate content issue. It really does not matter which version you’re using, but stick to one. To enable it, open the .htaccess file and uncomment the related lines (lines 81-82 with the www version, lines 87-88 without the non-www version).
- Install the SEO Checklist module. This module does not provide any functionality by itself, but it gives you a 58-points checklist for the most important actions related to the On-Site SEO. It helps to keep things organized and it also provides some automated tests for installed modules etc.
- Enable Clean URLs. This one is more than obvious, must check it just in case.
- Install and configure Pathauto module. The default URL for a Drupal node page is node/nid. Use this module to define URL patterns for every content type, taxonomy and user pages. Now, every time you create something new, a URL alias will be created automatically, which will be search engine friendly. For better results, try to limit the URL length to 115 characters.
- Install and configure Global Redirect module. In the previous step, we actually created a duplicate URL for every piece of content. When search engine’s spiders visit the site, they will actually track two different pages and it’s very possible to have a duplicate content penalty. This module solves this problem by creating 301 redirects from the original to the alias URL.
- Install and configure Redirect module. If you change the URL in a page which is already indexed in a search engine, when a user clicks on this specific result will land on a 404 error page on your site. You’ll also lose the benefit that you had from existing incoming links to this page. This module creates redirects from the old to the new alias and improves the search experience of the users.
- Install and configure Pathologic module. It fixes images paths and URLs inside your content, so that you can move them in different domains, subdomains or folders without creating broken links.
- Install and customize Transliteration module if you are creating a web site in a language different than English and you want to use only US-ASCII characters in your URLs.
- Create an account in Google Analytics and install and configure Google Analytics module. Google Analytics does not only have information about traffic, but it can also provide useful insights about the performance of the site’s landing pages for different keywords.
- Install XML sitemap module. Do not forget to configure the module and declare the content types and taxonomy terms that you want to be included in it the XML sitemap.
- Create an account in Google Webmasters Tools and submit the XML sitemap. This is a step, which is often overlooked. After the creation of the XML sitemap do not forget to submit it in GWT. Make a check a after a while that it was submitted successfully and there were no errors.
- Create an account in Bing Webmasters Tools and submit the XML sitemap. We all tend to focus on Google, but as Bing has now a market share of 16%, it is an important player that you cannot ignore.
- The default robots.txt of Drupal works fine in most cases, but some minor changes are usually required. In many cases you want to hide specific pages or folders of the site for search engines, by adding a new line with the “Disallow” command and the name of file or folder.
Also, add the URL of the XML sitemap inside the robots.txt file.
If you’re running a multi-site Drupal installation, use RobotsTxt to generate different files for every one of them.
Optimizing Pages
- Install Meta tags module. It allows the creation of patterns for automated generation of meta tags in the <head> section of the page. You can define global settings, but also different settings for every content type, taxonomy, file type or users.
- Configure page titles from meta tags settings. Every URL should have a page title; it is the main definition for search engines and their users, about the page’s content. To be compatible with the main search engines, try to limit the title’s length to 65 characters. Also, avoid duplicate page titles.
- Configure meta descriptions from meta tags settings. Meta description is not a ranking factor, but is the text that users read in the search engine results pages. The automated generation method uses the first paragraph from your text, so it’s not always ideal. It’s better to take a quick look before posting a node and adjust accordingly. Avoid duplicate meta descriptions and try to limit their length to 156 characters.
- Do not bother to use the keyword tag. Search engines stopped using it several years ago, so it’s not a ranking factor anymore. Actually, it can only help your competitors, as they can easily understand what keywords you are targeting for.
- Use proper heading tags. Drupal usually does it right by default, as node pages ,pages created by the Page Manager or Views, are using <h1> titles. Also, secondary elements like blocks or panes are using <h2> titles. Things to watch: some themes are using <h1> to display the site name, so be sure that you do not have two <h1> tags per page. Also, when you are creating your template overrides, be sure that you are using the appropriate markup for heading tags.
- Add the rel=”canonical” link element to declare the preferred version for search engines, among the different URLs that a Drupal page has. It can be performed through the meta tags module settings.
- Use the <alt> attribute for your images. Without it, search engines cannot understand the content of the image. Remember that you can have search engine visibility not only for pages, but for images as well.
When you’re using an image field, you can enable the alt attribute, through the field settings and then add it for every new image. - Optimize your image file names. Using a descriptive file name helps to achieve better rankings. Also, it is the first piece of text that is displayed in Google Images results, so an appropriate file name will attract more clicks.
- In many cases you create nodes in Drupal (like images, or tweets), with the only purpose to be included in other nodes, views or panels. To completely hide those pages from search engines, you can use the Rabbit Hole module, which creates redirects from this nodes to custom paths, so they are not visible or crawlable.
- Pay special attention when you are creating multilingual web sites. Translating only the site’s content and header tags is not enough. Every important element like page titles, page descriptions and alt attributes should be translated as well.
- Install and customize microdata module. Using microdata to markup you pages according to schema.org specifications, will increase the change for rich snippets to be displayed in search engine results pages and will have as a result increased visibility for your web site and clicks from the search engines. Alternatively, you can use RDFa.
- Social signals are becoming an important ranking factor, so it’s good to add social share buttons to your pages. There are many different modules for this task, like Social Share or Share This. Even better use custom code, as described in the Google Analytics social integration guidelines.
- You may read that Google+ is a failure or it’s dead. The truth is that even if it’s still a small network, it’s growing fast. In many cases Google+ is an important ranking factor for Google. So, creating a page in Google+ is a beneficial strategy. Also, use rel=”publisher” to connect your website with your Google+ page.
- Google authorship provides several benefits related to SEO. In many cases, it adds the author’s picture in the search results, thus increasing trustworthiness and click-through rates. Also, it generates a “more from author” button, to check other posts from the same author. So, first ask your site authors to create personal profiles in Google+ and add the site details in them. Then, add the rel=”author” attribute, a way to do it in Drupal is described here.
- If you’re creating a news website, optimize your site for Google news. Generate a Google news site map by installing the related module Also, consider using the news keyword metatag (yes, it’s a keyword metatag!) to help Google to better understand your content.
- Be careful when you’re using https. Many times both the http and the https versions of your pages will be indexed as separate pages. Search in Google for “site:yourdomain.com inurl:https” to locate duplicate content. Use robots.txt to keep search engines from indexing https pages.
Consider also to switch the whole site to https, as Matt Cutts from Google says in a comment that it’s OK to do it. - Unfortunately, Views or Panels do not have meta tags by default. Install and configure the Meta Tags Quick module, which allows the addition of the main meta tags for any path that is generated by Drupal.
- For the pager links of paginated content like Views, use rel=“next” and rel=“prev”. An easy way to do it is described here.
- Faceted Search is a great feature and very helpful for site visitors. If it’s not handled right though, it can cause serious problems to the site’s SEO. First of all, the generated URLs are containing a lot of parameters and are not search engine friendly. Faceted API Pretty Paths module solves this problem, as it allows the creation of URLs with an appropriate format. Also, as every filter and every sorting option creates a new URL with an extra parameter, even a small site with a few nodes can generate thousands of different URLs and gave a duplicate content issue. The correct use of canonical tags can eliminate this conflict.
Launching and beyond
- Hide or delete your development site. Your client will not like it when it is ranked higher than the production site in search engines.
- On the other hand, if you put a “Disallow: /” in your robots.txt file, remember to remove it, so that search engine’s spiders can crawl your new web site.
- Site speed is a factor in search rankings, and it also affects conversion rates. Read carefully the Drupal caching, speed and performance guide and optimize every aspect to your web site to the maximum.
- Use Screaming Frog to quick analyze your site and detect possible issues. Check for client and server errors, broken links, titles, headers, images and be sure that your new site is error-free.
- Forget the traditional link-building methods. Create a content creation and promotion plan and acquire links through social media and relationship building. Do not expect to rank well just because you stuffed some nice keywords and you are using Drupal.
- Be a part of the Search Engine Optimization Drupal group or chat on irc://irc.freenode.net/drupal-seo
SEO does not end with site launch, but it is a continuous process. Google algorithm changes about 500-600 times a year, so you have to be sure that everything is up-to-date. Make monthly audits in your website, study your analytics, check that all the new content is SEO optimized and make sure that no issues were causes by new functionality or updated modules.
This week's pick features some current affairs as well as some food for thought. Like every week these are five items that managed to get our attention. Enjoy!
Drupal
OSTraining: The State of Drupal 8: Before the Feature Freeze
Here is your one-stop overview where the development of Drupal 8 stands in the last few days before the Feature Freeze on December 1.
Technology
Co.Design: Could Twitter Help Us Create Smarter Transit Routes?
Visualizing geotagged tweets created a interesting insight into the most highly trafficked transport routes in major US cities. Unfortunately the density of geotagged social media activity here in Zurich probably isn't sufficient enough to create similar visualizations.
Wired: Facebook wants to share your data across all its businesses
Facebook announced plans to change its data policy this week. Here is a short overview.
Responsive Web Design
Helsinki Open Device Lab
Certainly one of responsive design's downsides is the variety of viewport sizes. Instead of acquiring tons of devices or using simulators to test the sites a different approach has been taken in the Finnish capital.
Web Analytics
SEOgadget: Content Analytics: Measuring Your Content Marketing Results
The truism of you can't manage what you don't measure certainly also applies to content marketing. Here are some ways you can measure you content marketing activities.
Welcome to the final post in this two-parter on how to import, modify and save your SVG as an image with JavaScript (JS). In this part we will be looking at the exporting aspect and how you can convert your imported SVG into an image. As mentioned in the first part this will unfortunately only work in Internet Explorer 9 and above. Although RaphaelJS supports Internet Explorer 8 and below, we cannot convert them in older versions of Microsoft's browser because it renders the imported SVG as VML and does not support canvas elements.
Getting the HTML ready
First we have to slightly modify our previous code by giving our SVG wrapper an ID (svg_wrapper):
<div class="svg-file" id="svg_wrapper" data-svg="Invisible_Pink_Unicorn_black.svg"></div>Next we are going to add the canvas and the image element, you can place this wherever you want but I decided to just place it under the SVG wrapper:
<div class="svg-file" id="svg_wrapper" data-svg="Invisible_Pink_Unicorn_black.svg"></div>
<canvas id="canvas"></canvas>
<img id="converted_image" src="">Let's add some titles to keep an overview:
<h3>SVG</h3>
<div class="svg-file" id="svg_wrapper" data-svg="Invisible_Pink_Unicorn_black.svg"></div>
<h3>CANVAS</h3>
<canvas id="canvas"></canvas>
<h3>IMAGE</h3>
<img id="converted_image" src="">Then we are going to add another button that will trigger the conversion. You can place wherever you want to:
<!-- color buttons -->
<button class="color" value="#000000">Classy Black</button>
<button class="color" value="#eb84b6">Sassy Pink</button>
<button class="color" value="#6f4a9a">Space Rainbow Purple</button>
<button class="color" value="#fff682">Yellow Star</button>
<!-- image button -->
<br>
<button id="make_image">make image</button>You may have noticed that I added a class to the color buttons, this is because we used to target all the buttons when changing the colors. But because there is now a button that does something else we have to adjust the existing JS a little bit:
$('button.color').live('click', function(){
unicorn.attr({
fill: $(this).val()
});
});Now its time for the JS stuff!
As mentioned above we will not go from the SVG to an image directly but instead convert it to a canvas element and convert that to an image. For this we will be using an additional script called: canvg
Download the package and embed it in the usual way (there are two scripts in there!):
<script src="rgbcolor.js"></script>
<script src="canvg.js"></script>Making the magic happen with canvg & .toDateURL()
After that we can add the click event for the new image create button we placed in earlier:
$('#make_image').live('click', function(){
// create the image of the canvas
});Inside here we first have to create the canvas from the SVG, for this we need to grab the canvas and the SVG elements:
$('#make_image').live('click', function(){
// create the image of the canvas
var canvas = document.getElementById('canvas');
var svg = document.getElementById('svg_wrapper');
svg = svg.innerHTML;
});Then we can call the canvg() function using our two elements:
$('#make_image').live('click', function(){
// create the image of the canvas
var canvas = document.getElementById('canvas');
var svg = document.getElementById('svg_wrapper');
svg = svg.innerHTML;
// create the canvas version of the svg
canvg(canvas, svg);
});If you try the whole thing at this point you will see that the canvas is successfully generated, for the image generation we are going to use the .toDataURL() function. This creates a base64 encoded url that we can safe and ultimately update the image placeholder with. You can also specify different image types, for this example however we are just going to generate a .png.
More information on the .toDateURL() function can be found here.
$('#make_image').live('click', function(){
// create the image of the canvas
var canvas = document.getElementById('canvas');
var svg = document.getElementById('svg_wrapper');
svg = svg.innerHTML;
// create the canvas version of the svg
canvg(canvas, svg);
// return the image
var img_url = canvas.toDataURL('image/png');
$('#converted_image').attr('src', img_url);
});If you now click on “make image” you should get a total of three unicorns on your display: the imported SVG version, the canvas version and lastly the image that you wanted so badly for Christmas.
That is the entire magic! You can find a working demo of this entire tutorial here.
Like every week here are the five stories that got out attention. Hopefully there's something among it that will get yours.
Opinion
Econsultancy: Dear silly web: 20 things to banish in 2013
With the end of 2012 rapidly approaching its time for dramatical predictions for the new year. This blog post, to be fair, points to things that would definitely improve the web.
Marketing
Seth Godin: Free coffee, next exit
Hard not to agree with Seth Godin's point of getting the message across.
Social Media
SEOmoz: When Is My Tweet's Prime of Life? (A brief statistical interlude.)
Interested in retweets (RTs), their source and lifespan? The Peter Brays' blog post is something for you.
Food for thought
Gadget Lab: Kill the Password: Why a String of Characters Can’t Protect Us Anymore
"The age of the password is over. We just haven’t realized it yet," argues Wired's senior writer Mat Honan and backs it up with his own painful experience.
Terence Eden has a Blog: Smuggling USB Sticks
Allow me to put Terence Eden's main motive of his blog post to one side and concentrate on the essence. This story once again points out how much change should be made with technologies we might no longer regard as cutting edge.
Yesterday was time for another Web Monday. This installment was hosted by Tamedia and featured talks by the hosts, Silp and wemakeit.ch.
Here are some impressions of the event:




More photos, by Boris Baldinger, of this Web Monday can be found in our dedicated Flickr set.
This week's edition takes a look at responsive web design, some crazy patents and a few presidential election related items. Enjoy!
Responsive Design
Simon Foster: The Responsive Designer
Respected web designer Simon Foster gives his views on responsive web design and what it means for designers.
Technology
The Atlantic: Apple Just Got Granted a Patent for Rounded Corners on Electronic Devices
Another mind-boggling story from the patent war.
United States presidential election, 2012
Time: Inside the Secret World of the Data Crunchers Who Helped Obama Win
Data-driven decision making at its best: Here is a view behind the scenes of President Obama's campaign.
ReTargeter: The Digital Campaign Landscape: The Final Push
Mitt Romney for President | Mitt Romney for President of the United States of America in 2012
Despite not winning the presidential elections at least his website's underlying technology (Yes, it was Drupal) would have been worthy of the White House.
Imagine the following scenarios: you have a SVG file from a designer and want to be able to define the colours of that SVG and export it as an image. Or alternatively just embed the SVG in your website and let users manipulate it.
In this two part tutorial we will be looking at how this can be achived with the help of RaphaelJS and jQuery.
First off the image export will only work in Internet Explorer 9 and upwards, the SVG file import however will work in older Browsers as well (aaaall the way down to Internet Explorer 7).
Beside RaphaelJS we're also going to use “vectron” by RoomandBoard. After you downloaded vectron you’ll find all the needed scripts and a handy example of how it works inside the “example” folder.
For the sake of this guide however I'm going to go through the whole process step by step (but you can download all my files as reference). Let's start by embeding all the different scripts to your beautiful header and don’t forget jQuery!:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="raphael-min.js"></script>
<script src="elemental.min.js"></script>
<script src="rappar.js"></script>
<script src="jquery.vectron.js"></script>Importing and modifying the SVG file
Then add the reference to your SVG file inside your HTML (make sure the path is correct):
<div id="svg-file" data-svg="Invisible_Pink_Unicorn_black.svg"></div>Place the div container where you want your SVG to appear (vectron will place the SVG elements inside this <div> container). For my example I'm using a unicorn SVG found on Wikipedia. There are also a bunch of example SVGs inside the “assets” folder from the downloaded vectron archive.
Creating the RaphaelJS object from the file is very simple:
$(document).ready(function() {
$('#svg-file').vectron(); });You can also scale your SVG to any size you want using vectron's built in scale functionality:
$(document).ready(function() { $('#svg-file').vectron({
scale: 2 // twice the unicorn fun!
});
});After this you should see your unicorn inside your browser, if you inspect the source you will see the familiar "Created with Raphaël…" inside the <svg>.
Depending on the size and complexity of the file it might take a while before the object is loaded, if you try to change the colour of the unicorn during this time, especially by selecting the path element directly you will notice that jQuery wont find it. However because vectron is using AJAX to get the SVG we can overcome this by using jQuery's "ajaxSuccess()" function. Everything inside the "ajaxSuccess()" will be executed once the AJAX request has been completed and is ready to be manipulated.
$(document).ready(function() {
$('.svg-file').vectron({
scale: 1
}).ajaxSuccess(function(){
// our fancy code will go here
});
});In order to change the colour of the unicorn or even add other elements to it you need the RaphaelJS object, luckily vectron provides this as well and you can easily access it using jQuery's .data():
$(document).ready(function() {
$('.svg-file').vectron({
scale: 1
}).ajaxSuccess(function(){
var paper = $('.svg-file').data('vectron').paper;
});
});From this point on you can manipulate the unicorn like any other element in RaphaelJS but you might want to save it into a variable to make it more accessible. Since the unicorn was the last element that was added to RaphaelJS, we can access it inside “top”:
$(document).ready(function() {
$('.svg-file').vectron({
scale: 1
}).ajaxSuccess(function(){
var paper = $('.svg-file').data('vectron').paper;
var unicorn = paper.top;
});
});Note: If you have an SVG with a lot of elements this might become a bit difficult, im trying to find a solution for this myself as I don't want to loop over each element again after it was built.
So now we actually can change the colour of the unicorn simply by changing the fill attribute:
$(document).ready(function() {
unicorn.attr({
fill: '#ED541D'
});
});Allowing users to alter the colour
But maybe we want the user to be able to do this right? So lets build some very simple buttons and add some more JS that change the colour:
HTML code for the buttons:
<button value="#000000">Classy Black</button>
<button value="#eb84b6">Sassy Pink</button>
<button value="#6f4a9a">Space Rainbow Purple</button>
<button value="#fff682">Yellow Star</button>JavaScript code for the colour switching:
$(document).ready(function() {
$('.svg-file').vectron({
scale: 1
}).ajaxSuccess(function(){
var paper = $('.svg-file').data('vectron').paper;
var unicorn = paper.top;
$('button').live('click', function(){
unicorn.attr({
fill: $(this).val()
});
});
});
});
Now you should be able to change the colour simply by hitting one of the buttons!
A few known issues
There might be some issues depending on your SVG file, one I've come across is that vectron will throw you an error if your SVG file contains any <linearGradient> elements. I have yet to find an elegant solution for this, however you can simply remove it by editing your SVG file... If you can live without it that is.
An other issue that I had was that the resulting <svg> wrapper had the wrong height and width, in this case you can just adjust the overall width and height of the <svg> element:
$('svg').attr({
'height': ($('svg').attr('height')*120)/100, // 120% of calculated width
'width': ($('svg').attr('width')*110)/100 // 110% of calculated width
});If you try run this on your local without a web server you might get a bunch of errors or no unicorn at all. Vectron uses Ajax requests to get the SVG file, for this you need to have a local web server or run it on a real environment. More about this issue can be found here.
In the next part of this series we will look at the export of the SVG into a PNG file.



Essence of a web week: Week 49
0Here is the traditional collection of stories that caught our attention this week. Enjoy!
Drupal
Quora: What are 5 Drupal strengths that other CMSs or frameworks don't have?
Not sure what you get with Drupal what no other CMS provides? Here are seven strengths.
Usability
UsabilityPost: Redesign Trend in Tech News Sites: Big, Responsive and Content Heavy
Dmitry Fadeyev analyzed the latest developments in the design of tech news sites. Here are his findings.
Social Media
Nielsen: Social Media Report 2012
With the end of the year approaching rapidly Nielsen published its annual state of social media report.
Conversion / Analytics
KISSmetrics: How to Track Offline Marketing Campaigns with Analytics
You thought that offline marketing efforts couldn't be measured with Google Analytics? Think again.
Tweets that cut through the noise.
#DroidRage
No question who started the flame war on this subject…