ASP.NET 2.0 Resources

Powered by Blogger

Free AdSense click tracking script updated!

I have updated the AdSense click tracking script. There is now support for advanced click tracking of AdSense blocks in different languages and some other minor improvements. I have collected data about as many languages the Google AdSense uses as I could. The list is not yet complete, but I think all the most used languages are covered. You can download this free adsense tracking script v2 right now.

If you don't know what i am talking about, here is a little background for you. This script allows you to track clicks on Google AdSense advertisements on your websites and report every single click or AdLinks keyword click to online Google Analytics. Google Analytics interface supports more advanced reporting then AdSense itself. This could help you to optimize you AdSense placement, improve your CTR and eCPM and the best part it's all free.

The installation instructions and other information can be found in my previous blog post Tracking AdSense clicks with Google Analytics. The is also whole tutorial how to interpret tracking results with google analytics in one of my posts: Analyzing and Interpreting AdSense results with Google Analytics.

There is a little difference from previous tracking script version. To support additional languages, the script is now saved in utf-8 encoding. Be sure to preserve this encoding when editing this script, otherwise it won't function correctly. It's also a good idea to reference this javascript with correct charset from your web pages (see the following example).

<script 
    src="/javascript/astracker.js" 
    type="text/javascript" 
    charset="utf-8">
</script>

6 Comments:

  • Hi,
    you can do this with dynamic with bug image from javascript. Something similar to...

    function fillDatabase(reportedUrl) {
    bug = new Image();
    bug.src = 'results.aspx?ref=' + document.location + '&url=' + reportedUrl;
    }

    The next step is to process ref and url querystring parameters within your ASP.NET application.

    By Blogger dolly, at 8:36 AM  

  • Hi, Dolly.

    Many thanks for your wonderful work. Your script supports many languages and I enjoyed it.

    I found your script are missing one suffix for Korean language. In the google adsense, there are two prefixes which are 'go to' and 'View ads about'. The first one is the prefix of AdSense for contents and the latter one is the prefix of AdSense for links.

    In case of Korean, only 'View ads about'is included in the lngFilter. The modified version that includes Korean suffix for 'go to' is located at http://b4dawn.googlepages.com/astracker.zip. I hope this is included in your next version of astracker.

    By Blogger Joongsoo, at 10:42 AM  

  • Hi Dolly,

    I've installed the script using an absolute URI in the goal setup and for some reasons only links from link blocks are tracked (not from ad blocks).

    I've now setup a relative URI (/asclick) and I'll see if anything changes.

    By the way, any chance to get this to work with the new Analytics interface?

    Keep up the good work

    Dario

    By Blogger Unknown, at 10:37 AM  

  • Hi there,

    Thanks for wonderful article. Can you please help me with my problem? I have two systems capturing visitor activity for same site. One in PHP and one in ASP.NET(VB).

    So, every page has following two javascripts just before the closing body tag.

    -------------------
    <script><!--
    var _ref=escape(document.referrer),_res,_dep;
    if (self.screen){_res=screen.width+"x"+screen.height;_dep=screen.colorDepth;}
    else if (self.java) {var j=java.awt.Toolkit.getDefaultToolkit();var s=j.getScreenSize();_res=s.width+"x"+s.height; }
    q='?type=1&site_id=2&ref='+_ref+'&res='+_res+"&dep="+_dep;
    document.write("<img src='http://dev.soluserv.com/temp/webvisitor/c.php"+q+"' width='1' height='1' border='0' />");
    --></script>

    <script><!--
    var _ref=escape(document.referrer), _res, _dep;
    if (self.screen)
    {
    _res=screen.width+"x"+screen.height;
    _dep=screen.colorDepth;
    }
    else if (self.java)
    {
    var j=java.awt.Toolkit.getDefaultToolkit();
    var s=j.getScreenSize();
    _res=s.width+"x"+s.height;
    }

    q = '?SiteID=2&ref='+_ref+'&res='+_res+"&dep="+_dep;
    document.write("<img src='http://benchmark.rpts.tamu.edu/WebsiteVisitor/c.aspx" + q + "' width='1' height='1' border='0' />");
    --></script>
    -------------------

    The probelm here is, both system captures all the pages, but .NET system can't capture the pages from GoogleSyndication. While that referrer is being recorded in PHP system. I cant guess the reason why?

    Can you give me some suggestion?

    Thanks,
    Maulik

    By Blogger MD [Maulik Dave], at 12:05 PM  

  • Nice article you got there dolly. I am searching for tracking tools and i have dropped by here and found version 1 and version 2 of your tracking system. I will create a link to your sit from my blog.

    Money Making and Blogging Tips

    By Blogger Charles, at 3:54 PM  

  • The flight attendant cover letter will help you in improving many things related to specific job.I hope it will work.

    By Blogger aliyaa, at 3:05 PM  

Post a Comment

<< Home

Created dolly