contact us

Use the form on the right to contact us.

You can edit the text in this area, and change where the contact form on the right submits to, by entering edit mode using the modes on the bottom right.

blog

DIY QR Code Pet Tags

John Federico

After seventeen years of being a one-dog household, we decided to double our dog ownership.

We adopted a ten-year old chocolate Cocker Spaniel named Oreo whose owner was moving from a house to an apartment and couldn't take him. Given our history with rescue dogs, we know that it's typical for older dogs to be passed over for adoption since most families want younger dogs or puppies.

We didn't want to see him spend the rest of his life in a foster home (or worse) so we decided to welcome him to our family. He's a great dog and gets along well with our Lucy, a four-year old, black and white, parti-colored Cocker Spaniel.

Oreo has a microchip but we don't know who the vendor is, so we can't find the registry. That means that the old guy definitely needed new dog tags.

I started poking around the Interwebs and found a few interesting things.

You can get pet tags with QR codes!

Unlike many of the silly uses of QR codes that I see, this is a brilliant use of the technology: find a pet, scan the QR code on its tag and find out all about them including their owner's name and address, eating habits, favorite activities, medical history - the works.

One thing really bugged me, though: the only QR code pet tag solution I could find is managed by one company: PetHub. I tried creating profiles for both of our dogs but I found the service slow and buggy.

Plus, as a person who calls himself "half-geek, on my mother's side," I knew I could do better, so I did. ;)

Here's how.

Requirements

  • Standard Web Pages & Mobile-Optimized Web Pages. Anyone who may find the dogs should be able to load a web page to learn more about them. The pages should also be optimized for mobile browsers since someone may use a smartphone to read them.
  • Short URL. For those people who can't use the QR code on their phone or prefer to type a URL into a desktop browser, a short URL is required so that it can fit on the tag in a single line of text.

    For the sake of longevity and flexibility, I want to be able to redirect the short URL to the page of my choosing in case I decide to change the location of the web pages later. This way, I don't have to pay for another set of tags should the ultimate destination change.

    Note that most short url providers (bitly, tinyurl, etc) don't allow you to change the URL destination. (This is a spam prevention measure.) As a result, you may have to set up your own URL shortener. More on this later.
  • Bonus: SMS autoresponder. Texting is the lowest common denominator for mobile phones. If someone has a Feature phone they may not have a mobile web browser. Using an SMS response tool, they can always send a text message to learn more about the dog.

So, let's begin.

Pick a Code

First, decide what kind of QR code you want to use. QR codes can contain all different kinds of data: paragraphs of text, vCards, URL's - even commands for your phone to send an SMS message or launch an application. (These are usually platform dependent, though and not appropriate for this use case.)

The more data the code contains, the more complex the code will be to read. More importantly, depending on the QR code reader, your phone may not be able to act upon the data embedded in the code.

For example, I've encountered many QR code readers on the iPhone that simply don't know what to do with a vCard. (FYI: Qrafter is the best QR code reader for the iPhone.)

With this in mind, I decided to encode a simple URL in the QR codes for my pet tags. URLs seem to be the universal data supported on smartphone QR code readers.

The URL encoded in the QR code will be the short URL I mentioned in the requirements. More on this later.

The Destination

With that out of the way, it was time to decide where to point this URL.

You can create a mobile-optimized site using plain text files, basic HTML, mobile-optimized RapidWeaver themes, Wordpress.com, Blogger.com - whatever you want.

Since I'm very familiar with self-hosted Wordpress, I selected it as the platform for this solution. With the right plugins, it can serve up standard web pages as well as mobile-optimized versions.

If you already have a blog, you can simply create a post that contains the information about your pet and skip the section where I describe how I set up Wordpress for this project.

The Short URL

I registered my own domain (jfed.me) for this purpose. Again, this is so that I have ultimate control over the short URL's destination. Plus, it's just cool. ;)

The Setup

This my setup. Choose what works best for you.

1. Install:

  • Wordpress (Pick any theme)
  • Wordpress Mobile Pack plugin (For mobile-optimized pages)
  • W3 Super Cache plugin (For super fast pages. Optional, but definitely worth the few minutes to set it up. There are other caching plugins but this one is supported by the Mobile Pack.)
  • Yourls (a private, custom URL shortener)

2. Activate and configure the plugins

3. Create your pages. You can either create Wordpress Pages or Posts. (I chose Pages.)

4. Populate each page or post with information about your pet. (Contact information, vaccinations, favorite foods, toys, etc.)

Shorten the URL

Once you've create the pages with your pet's information, copy the url and shorten it using your Yourls installation or your URL shortener of choice.

Create a QR Code

Now that you've got a place to point interested parties and a short URL to get them there, you need to create a QR code. There are a number of sites where you can create a QR code but this is my favorite QR code generator - it's made by the same developer who created Qrafter, the QR code reader for iPhone that I mentioned above.

Simply enter the short URL and submit the form. (There are a bunch of options in this tool, but you don't need to be concerned with them.)

Save the image of the QR code to your hard drive. You'll need it later.

Working with Text Messages

As I mentioned in my requirements, I wanted to see if I could figure out a low-cost solution for SMS autoresponders using infrastructure I already had in place.

For this, I chose Twilio and their OpenVBX software.

Twilio offers Voice and Text Messaging as a Service. Simply put, with a little code and a Twilio account, you can create applications that use Voice Over Internet Protocol (VOIP) or SMS text messages.

If you don't code, that's ok - you can setup an instance of OpenVBX and use that. Even better - if you don't know how to install OpenVBX, Dreamhost offers a one-click installation process. All you have to do is tell Dreamhost where to install it in your Dreamhost account, then login using your browser to configure it.

Twilio charges $1 per month for a local number and 1 cent for each SMS message sent or received. The OpenVBX software is free.

I use OpenVBX and a Twilio number as a phone system for my company. I have a second number that we use use only for conference calls, so using that second number, I instructed OpenVBX to create an autoresponder, one for each dog.

(Note that I've replaced some of the numbers and email addresses below to keep them private.)

This means that when someone texts Oreo to (212) XXX-XXXX, they'll receive the following message:

Oreo is up-to-date on all of his vaccinations.

HE DOES NOT BITE though may growl if approached while eating.

http://jfed.me/oreo

or respond with "contact"

If someone responds with contact they'll receive the following message:

It's best to contact John at 201 XXX XXXX or

abc@newrules.com

You can also contact Denise at 973 XXX XXXX or

xyz@newrules.com

Create the Tags

So, where do you get pet tags with custom QR codes on them?

Etsy.

After a few searches on Duck Duck Go, I found Etsy maker "postlife." He has laser engraved dog tags on offer, mostly for wear by humans.

If they're good enough for humans, they're good enough for my dogs. ;)

The seller indicated that he could engrave both sides. Once I confirmed this, I paid him via PayPal and sent him the QR code I made for one side of the tag and text for the other side.

The back of Oreo's tag contains:

"Oreo"

Maplewood, NJ

Call 973-XXX-XXXX

Text "Oreo" to

212-XXX-XXXX

jfed.me/oreo

Lucy's is the same, except for the keyword that people send via text message.

So now, both of our dogs have new pet tags connected to me and my wife using a handful of modern communication tools.

It was a fun little project, but I hope no one ever has to use them. Funny how that works, huh?