March 29, 2017
April Fools Pranks with Google Tag Manager – 4 Konami Codes
Multiple websites have added Konami code as a joke to their websites. In case you don’t know, it’s a cheat code in many Konami games, where the cheat is executed with a sequence of key presses on the keyboard. In this blog post I’ll show several examples how you can easily add Konami code with Google Tag Manager to your website. Feel free to use them!
But first, a quick confession to my CEO:
Last year on April Fools, I added a Konami code to Soundest blog as a joke. I thought I would remove it soon but then forgot. Honestly. Months have passed. Now it’s almost a year. If you wish to see how it works, open our blog with desktop and type the following keyboard combination anywhere.
up, up, down, down, left, right, left, right, B, A
Anyway, I decided to keep it. Just like a kid keeps a pet found on a street.
Ok, now let’s get back to the topic.
So what is Konami Code anyway?
The Konami Code is a cheat code that appears in many Konami video games, although the code also appears in some non-Konami games as well. Years later it became an internet meme and was adopted by multiple website creators.
Various web developers have hidden an Easter egg in their projects that can be accessed by entering the following sequence of key presses on the keyboard:
As an example I always mention Digg. When executed, Konami code changes images to a mosaic of Rick Astley and Never Gonna Give You Up starts playing in the background.
Here are few more examples (for science). I won’t spoil them, go see it for yourself:
How Can I Add Konami Code With Google Tag Manager?
Since April Fools is coming, I decided to collect and publish several Konami codes as ready-made Google Tag Manager Recipes.
Each template not only contains the actual Konami code, but it also fires an event to Google Analytics after someone enters that magic keyboard combination. You know, for science… as usual.
I used this one in Soundest’s (startup where I work) blog. Unfortunately I cannot find the original author of this script anymore. If you know, contact me and I’ll add a link to his/her website.
What does this Konami code do?
- It checks images on the page and replaces them with image of Doge (remember this meme?)
- It also randomly displays on the screen various words using Comic Sans.
What does this Konami code do?
- It checks images on the page and replaces them with a GIF of dancing Rick Astley.
- Plays Never Gonna Give You Up in the background.
- And also randomly displays lyrics on the screen using Comic Sans.
Another dead meme. Yay! This Konami code for Google Tag Manager is based on a meme from 2013. Yeah, it’s four years old. Feeling much older, huh?
Ok, let’s milk the same Konami code one more time. But first, here’s the meme this Konami code was based on. It was really popular about a month ago.
Create your own Konami code for Google Tag Manager
If you’re not happy with what is offered in this blog post, there are two ways you can easily create your own Konami code.
In that case:
- Download any ready-made Konami code GTM recipe from this blog post.
- Open cHTML – [xxx] Konami code. [xxx] stands for Doge, Rick Roll or any other title that I used in the GTM container.
- Do not forget to rename the tag – replace [xxx] with some title that clearly describes your new Konami code.
- Test your new code with Preview and Debug mode.
Option #2. You Modify RICk Roll Script from this Blog Post
- Edit URL (see the screenshot below) – a link to a publicly accessible audio file. If you plan to upload a file to Dropbox, make sure you add ?dl=1 at the end of the link.
- In lines 5-8 add phrases that will be randomly displayed on the screen. There’s no limit, so you can add as many additional lines as you want. Just make sure there’s no comma after the last list item. Here’s an example:
Or if you don’t want any text to be displayed at all, remove all list items like this:
- Change the link of image/GIF that will be used by the script. Try not to use too large image – if it takes more than several megabytes, it will take longer to load. Try being as optimal as possible.
And there you have it! Your custom Konami code ready to be published with Google Tag Manager. Just make sure you test it before going live. Preview and debug mode is your best friend!
A call for Contribution
Remember, you can always add humor to serious topics. Web analytics isn’t an exception.
In this blog post I have shared several examples how you can easily add Konami code with Google Tag Manager to your website. Each code can be downloaded from Library of GTM recipes and easily imported to your Google Tag manager container.
This page also contains a Konami code. Try it yourself!