Reviving the Konami Code for website greatness and retro kudos!

For those with a love of retro gaming, you will have fond memories of the Konami code. This cheat code was triggered by inputting the following sequence with your game controller.

The code was first used with the 1986 release of Gradius for the NES. It was dubbed the ’30 Lives Code’.  It was commonly used but not limited to Konami games, making its way into popular culture.

If we look past the nostalgia for a second, did you know you can add the Konami code to any website to trigger custom events? The answer is yes, yes you can. I’ll show you how.

Adding the Code

Thanks to Konami JS (a simple JavaScript plugin) we can get started with just a couple of lines of code. Simply add the following to the <head> section of your chosen webpage:

<script type="text/javascript">
 	konami = new Konami();
        konami.code = function()
        {
        /* Add Custom Event Here */
        }
        konami.load();
</script>

This code listens to the Konami code input via your keyboard (if you are wondering how mobile is supported here, you will be pleased to know that iPhone and gesture commands is supported). Once the code has been triggered it will call a function. You can place any JavaScript in this function that your heart desires.

The following example triggers a simple alert box.

	konami.code = function()
        {
	alert("You have entered the KONAMI CODE!")
	}

Track it with Google Analytics

If you are wise enough to want to track how many times the Konami code has been triggered, this can be done easily with Google Analytics event tracking. In the example below we have simply added event tracking within the function that is called once the Konami code has been triggered.

	konami.code = function()
	{
	/* Add Custom Event Here */
	_gaq.push(['_trackEvent', 'Konami', 'Triggered']);
	}

It’s pretty flexible so you can add in your own customised tracking via Google Analytics or another analytics package.

What can we do with the Konami code?

You might be thinking – I’ve added the code, now what? I’ve brainstormed a few ideas below.

Discount Codes

If you run an e-commerce website, you could display a discount voucher via an alert box (or something fancier) if someone enters the code. This is a creative and engaging way of sharing discount codes with your customers.

Humour

As businesses it can be tough to give a personality to your online presence. Adding a nice bit of humour softens the sometimes ‘hard’ image of a website and lets users know that they are interacting with people and not the T-1000.

The choice and class of humour used is ultimately down to you. It does need to be chosen carefully. Think of it as a potential ice breaker with your users / potential customers!

Prize Draws

Create a regular prize draw where entering the code gives the user an entry into the competition. At the end of the competition , the user could be notified if he or she wins via a webpage on your site. This could be great for creating a buzz and encouraging repeat visits.

Gamification

If points and badges are your thing, then the Konami code could fit into your gamification strategy. Reward your visitors for triggering the code. A fancy badge would be nice!

Easter Eggs

Hidden messages or jokes (otherwise known as Easter eggs) remain popular. Remember typing ‘do a barrel roll’ into Google? How about finding a flight simulator within Microsoft Excel?

If your Easter egg gets enough popularity / exposure, it’s likely that you may be featured in Easter egg compilation lists too, gaining buzz and links at the same time.

Give something away for free!

People love free things. Is there a free gift, whitepaper or exclusive video you could share?

Your New Customer

There is plenty of scope for creativity here. The value of adding the code successfully has both on-site and off-site benefits. It can increase user engagement, create a buzz and get you the odd link or two (gold dust).

We would love to hear your suggestions on Konami code integration – please get involved and leave a comment below.

  • http://www.extreme-creations.co.uk/blog/author/jpaylor/ Jonny

    There’s also a cool site called “Konami Code Sites” at http://konamicodesites.com/ – entering the Konami code will present you with a list of websites that have utilised the Konami code, including some big sites like Facebook!