Today, it is time to announce Bananalytics. Bananalytics is a tool that makes your website go bananas.

Implementation is as easy as a (banana)pie. Bananalytics hooks onto your favourite script. All you need to do is to copy and paste the code below and change the bananas value to your script of choice.

Banalytics code – Google Analytics example

<script type="text/javascript">
    var bananas = 'Google Analytics';
    /*General Bananalytics code*/
    function bananalytics(a){"undefined"!=typeof $("span:contains("+a+")").parent()[0]&&($("span:contains("+a+")").parent().append("<span>Bananalytics</span><br/>"),clearInterval(myVar))}function addBananlytics(){bananalytics(b)}var b=bananas,myVar=setInterval(function(){addBananlytics()},2e3);
  </script>
  

After this, bananalytics will hook onto that script and, as a result, the tool will show up in the script tracking tool Ghostery.

Bananlytics in Ghostery

Keep in mind that to run Bananalytics, you’ll need to have jQuery running on your website. Also keep in mind that the tool is completely bananas.

How it really works

Bananalytics is a piece of code that adds a span element to the container holding the Ghostery notifications. Ghostery is a browser plug-in that shows a list of the scripts running on any given website. With our script, you can trick visitors using Ghostery into thinking you’re running a specific script.

In this post, we’ve used Bananalytics as an example, but you can use this for any kind of script. All you need is the title of an existing span element in the Ghostery notification.

If you have any other questions, don’t hesitate to ask.

Leave a Reply