Geckoboard – Adsense widget

There is now an easy way to see the current revenues from Google Adsense in your Geckoboard dashboard – in realtime (only depending on the update frequency of Google Adsense).


Adding a Google Adsense dashboard is easy. All you need is a website that can run a PHP script and also has the CURL module installed.


Geckoboard_widget for Google Adsense v1.0


You only need to download the following archive and extract it to a directory on your webserver. It is not necessary to protect the directory with a .htaccess file because Geckoboard provides an internal mechanism therefor which is implemented in the Adsense widget.


Step1: setup widget configuration

You first need to configure the widget itself. Thus you need to edit The following values are used at the moment:

  1. $login: use your login email address to access your Google Adsense account
  2. $password: write here your password to login with the specified account
  3. $sharedSecrect: this is used to authenticate the request sent by Geckoboard so that only some knowing the secret can access the script and so see your Adsense revenue
  4. $value1: specifies what shall be displayed as the main value, consists of the following elements:
    • report: defines which Adsense build-in report should be displayed, can be today, yesterday, last7days, lastmonth, thismonth, sincelastpayment
    • display: defines which value of the selected report is to be displayed; can be: impressions, clicks, ctr, ecpm, earnings
    • text: optional, can be used to display additional information text (only used for bigger widget sizes)
  5. $currency: optional, can be used as a prefix string before the value; e.g. ‘$’, ‘€’, ‘£’ or another simple string like ‘CHF’.

Step 2: Geckoboard

Setup a new instance in Geckoboard. Log in to and go to your dashboard.

Press Add Widget and Select Custom Widgets => Number and Secondary Stat

Configure the new widget instance with the following values

Configure the Adsense widget

  • URL data feed: the url where you stored the widget, e.g. www.yourdomain./mygbwidget/widget.php
  • API key (optional): the shared secret you specified in step one for $sharedSecret
  • Widget type: Custom
  • Feed format: JSON
  • Request format: GET
  • Reload time: 15 (min)
  • Label (optional): whatever you like
  • Select widget size: small should be fine

That’s it, now you will see your Adsense stats:

Google Adsense widget for Geckoboard

Limitation and known problems

  • It takes some times until Google finally delivers the data to the widget.
  • The library to fetch the Google Adsense data is using the old Adsense interface.

References and used libraries

One thought on “Geckoboard – Adsense widget

  1. Pingback: Adsense widget for |

Comments are closed.