HowTo: Generate QR code for your site
Everyone know that one of the keys to have a great SEO for your website is making sure you keep your website updated, new and fresh. Whether you do this with a blog, or you change your homepage with new offers, coupons or new products, it serves to show Google that your site is “alive.” For many small businesses in particular, this is a real challenge.
So you already have great, fresh content on your site – what’s next? Do you know what is coming that may benefit your business?
What are QR codes?
QR codes (abbreviation for Quick Response code) are a popular type of two-dimensional barcode. They are also known as hardlinks or physical world hyperlinks. QR Codes store up to 4,296 alphanumeric characters of arbitrary text. This text can be anything, for example URL, contact information, a telephone number, even a poem! QR codes can be read by an optical device with the appropriate software. Such devices range from dedicated QR code readers to mobile phones.
Uses of QR codes
- QR Codes on business cards
- Laptop stickers
- Storefront displays
- Promotions, discounts and giveaways
- Use QR codes to get Likes and Follows
- Increase e-commerce sales
- Build your email subscriber list
QR code for your site?
Creating QR code
Google charts API allows us to generate QR code by passing various parameters to their API. Below is the short description of each parameter-
|cht=qr||Yes||Specifies a QR code.|
|chs=<width>x<height>||Yes||Image size. (Remember it’s English alphabet ‘x’ and not cross ’X’ )|
|choe=<output_encoding>||No||How to encode the data in the chart. Here are the available values:
|chld=<error_correction_level>|<margin>||No||error_correction_level – QR codes support four levels of error correction to enable recovery of missing, misread, or obscured data. Greater redundancy is achieved at the cost of being able to store less data.Here are the supported values:
L – [Default] Allows recovery of up to 7% data loss
M – Allows recovery of up to 15% data loss
Q – Allows recovery of up to 25% data loss
H – Allows recovery of up to 30% data loss
margin – The width of the white border around the data portion of the chart. This is in rows, not in pixels. The default value is 4.
Now, lets create QR code for Tutkiun, the values passed to parameters will be-
And the request URL is-
Generated QR code by Google chart API-
QR code for WordPress blogs
As WordPress provides functions which return base URL of a blog, we can use these functions.
<img src="http://chart.apis.google.com/chart?cht=qr&chs=150×150&chld=L|4&chl=<?php the_permalink(); ?/>" width="150" height="150" alt="QR code" />
Like this article? or have something to say? comment it down.