x



Setting up Google Analytics to track Adsense click

A few posts back, I learned that Google Analytics can be used to track Adsense clicks. After setting up and running for a few weeks, I ready to report on it.

This article is divided into 2 sections. The first is my notes on setting up the tracking code. The second is reading the Google Analytics report.

Setting Up

The code I am using comes from ASP.NET 2.0 Resources. (A local copy is here.)

The setup requires changes in the web page and the Google Analytics seetings.

Web page setup

  1. Download astracker_v2.zip, unzip and upload the tracking javascript astracker.js to the web server.
  2. Add reference to this javascript to your web page directly below Google Analytics code (see example below).

    <script src="http://www.google-analytics.com/urchin.js"
      src="http://www.google-analytics.com/urchin.js"
      type="text/javascript">
    </script>
    
    <script type="text/javascript">
      _uacct = "UA-xxxxxx-y";
      urchinTracker();
    </script>
    </script src="/javascript/astracker.js"
      src="/javascript/astracker.js"
      type="text/javascript"
      charset="utf-8">
    </script>
    
  3. Save the file.

Google Analytics Setup

  1. Log on to your Google Analytics account and open settings for desired web page by clicking Edit link.
  2. You should see “Conversion Goals and Funnel” pane with four goals (G1-G4). Click on the Edit link for first goal (G1).
  3. Set Goal URL to “/asclick” (without quotes), Goal name to “AdClicks” (without quotes) or whatever you like. Set this goal as active (by checking Yes option for Active Goal)
  4. Skip Define Funnel, scroll down to Additional settings and make sure Case sensitive option is NOT set and Match Type is set to Head Match.
    Click Save Changes button to complete setup.

Reading the Report

Once it is setup, leave it to run for a few days and you should see some interesting traffic and click statistics.

There are a few reports that report on the click conversion. I divide them into Summary, Detailed and Drilldown.

Summary Report

The first is the Conversion Summary.

GA-report-1

The Goal Conversion is shown as G1:AdClicks

GA-report-2

Detailed Reports

Detail reports are found in All Reports > Content Optimisation > Goal & Funnel Process.

GA-report-3

Goal Tracking

Shows the number of clicks over time.

GA-report-4

Goal Conversion

Shows the conversation rate - clicks as percentage of visits.

Defined Funnel Navigation

Basically a visual of the entry point leading to the click.

The last 2 reports Reverse Goal Path and Goal Verification provides the most information about your Adsense ads.

Reverse Goal Path

This shows the path leading to the click. Notice how the ad unit and the target destination is shown.

Using the pseudo Goal URL, the goal click is shown as /asclick/ad_unit/www.visited-site.com

You get 2 important information here

  1. You know which ad unit is popular
  2. You know where your visitor is clicking on. You will not find this information from Adsense.

Goal Verification

This report is a reverse of Goal Path shoing the final Goal URL

Drilldown

There are many drilldown that you can do based on the Goal URL. I will just point out 3 functions you can use and leave the atual exploration to you.

  1. Use the filter with “asclick” to look for the Goal URL you want to look at.
  2. Use the display drop to show more than 10 items per page.
  3. Use the drilldown options to dice and slice the data in anyway you want.

*Note that stats show above are not necessarily from the same site or date.

Do you have any particular report or drilldown that you find useful? Share it with our readers here.

4 Responses to “Setting up Google Analytics to track Adsense click”


  1. 1 Paul

    What are these attributes you are using in the script tags, mce_src and xsrc?
    Using them causes my pages to fail validation for xhtml. I’ve google around and see them being used all over but, no explanation. I was wondering if you knew.
    thanks

  2. 2 Ken

    Sorry, the code was messed-up. Fixed.

  3. 3 Marc

    I have tried everything, it isn´t working, the clicks aren´t counted. Does someone can give me a hint?

  4. 4 Ken

    Please provide some information on how it is not working so that we can help.

Leave a Reply