DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2005
    Location
    Simi Valley, CA, USA
    Posts
    7

    how does yahoo's javascript Conversion Counter work?

    I don't understand the following javascript code nor how it could possibly have the conversion data. Does it record an ip address? I'm not a javascript programmer and would appreciate any help.

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Overture Services Inc. 07/15/2003
    var cc_tagVersion = "1.0";
    var cc_accountID = "2079408136";
    var cc_marketID = "0";
    var cc_protocol="http";
    var cc_subdomain = "convctr";
    if(location.protocol == "https:")
    {
    cc_protocol="https";
    cc_subdomain="convctrs";
    }
    var cc_queryStr = "?" + "ver=" + cc_tagVersion + "&aID=" + cc_accountID + "&mkt=" + cc_marketID +"&ref=" + escape(document.referrer);
    var cc_imageUrl = cc_protocol + "://" + cc_subdomain + ".overture.com/images/cc/cc.gif" + cc_queryStr;
    var cc_imageObject = new Image();
    cc_imageObject.src = cc_imageUrl;
    // -->
    </SCRIPT>
    Sentry Password Protection Solution - Turns any site into a membership website - Full PayPal Subscriptions IPN support - Sentrylogin.com

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    I can't really tell what this JavaScript is doing, other than to create an image based upon a specified url. I don't even know what the "conversion data" you refer to is.

    What I can determine, based upon the code, is that the QueryString (cc_queryStr) in the url (cc_imageUrl) is processed by the overture.com site and an image is returned to the page. The overture.com page is receiving a version, account ID, market ID and the referrer (which is the url of the document containing the link that brought the browser to the current document - if available).
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    A sample URL would look like:
    http://convctr.overture.com/images/c...//blahblah.com

    It is trying to fetch an image based on the parameters passed to it. So, I figure there would be a servlet mapping to a URL pattern like /images/cc/cc/gif, which would read those parameters and generate an image.
    Here's a link which provides how servlets generate images

    I hope I was not off the track!
    Happiness is good health and a bad memory.

  4. #4
    Join Date
    Oct 2005
    Location
    Simi Valley, CA, USA
    Posts
    7

    thanks

    Thanks everyone, that does help a bit. I've since stopped using Yahoo Sponsored Search anyway because it is SO expensive and in a month hasn't converted a single visitor to sales.
    Sentry Password Protection Solution - Turns any site into a membership website - Full PayPal Subscriptions IPN support - Sentrylogin.com

Similar Threads

  1. Why does this not work? JavaScript
    By Sral( JavaScript Beginner) in forum Web
    Replies: 3
    Last Post: 04-02-2002, 02:48 AM
  2. Replies: 0
    Last Post: 11-14-2001, 07:02 AM
  3. Preloading miages in javascript, used to work!
    By Sevan Baghdasarian (WEB DEV) in forum Web
    Replies: 2
    Last Post: 11-27-2000, 08:12 AM
  4. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 02:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links