How to Add a Dynamic QR Code to each Blog Post

Certainly, QR code have become substantially popular with the introduction of Android phones. Using a QRCode, one can easily open any link or app URL on supported mobile phones just by scanning a specific QR code using the camera and QR code reader app.

A QR Code is a matrix barcode (or two-dimensional code), readable by QR scanners, mobile phones with a camera, and smartphones. The code consists of black modules arranged in a square pattern on white background. The information encoded can be text, URL or other data.
With the growing user base of Android smartphones, the application of QR code has apparently increased a lot. Here is a nice tip for all webmasters and site owners, specially beneficial for sites targeting users looking for mobile phone related stuff.
 
You can consider adding a Dynamic QR Code to your site pages which includes all your articles. This can be simply done by adding a short code to the preferred location on your site. After adding the script, a dynamic QR code gets generated for each post. Whenever users scans the code from their mobile, that particular webpage will open up.
 
qrcode_android
 
To embed the script for QR Code, just copy the below code and paste it any where in your website. That’s all. To change the image size just modify the “size=150×150” to what ever equal value you want.
 

<script type="text/javascript">

var uri=window.location.href;

document.write("<img src='http://api.qrserver.com/v1/create-qr-code/?data="+encodeURI(uri)+"&size=150x150'/>");

</script>

You can also create a table and add a short description on how to use the QR code, making it easier for users. Just check the demo right away in our blog sidebar. 🙂
 
Thanks ClassicTutorials for this amazing tip!

Mayur

Mayur Agarwal is the founder and editor-in-chief of WebTrickz. As a Technology enthusiast and an Internet addict, he loves sharing useful How To’s and Tips & Tricks. Follow him @mayurjango on Twitter where he is extremely active.

1 Response

  1. Nice tutorial but is it supported in Blogger?

Leave a Reply

Your email address will not be published. Required fields are marked *