1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Google Analytics - urchinTracker(); - object expected javascript error fix

Discussion in 'Google Analytics' started by ProductivePC, Sep 24, 2006.

  1. #1
    Okay,

    Recently I ran into a problem where every page of my site had a javascript error on it. The error was coming from Google Analytics.

    A line as such:
    urchinTracker();

    in the following code:
    
    <script src="[URL]https://ssl.google-analytics.com/urchin.js[/URL]" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "XXXX-XXXX-XXXX";
    urchinTracker();
    </script>
    
    Code (markup):
    I searched and searched and finally found someone that was able to answer the question in the french Google Groups (stranglely enough the answer was written in English)

    The answer turned out to be a HOSTS file I had downloaded on my own computer was blocking Google Analytics and since the previous line:
    <script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript">
    calls Google-Analytics, this was causing the error.

    So, if you are receiving this same error from either IE6 or IE7 Beta then check your hosts file and comment out the references to Google-Analytics.

    Hope it helps,
     
    ProductivePC, Sep 24, 2006 IP
  2. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #2
    Nice Find, will be usefull for many
     
    Abhik, Sep 24, 2006 IP
  3. susb8383

    susb8383 Active Member

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #3
    I had the same problem on one of my pages. HOSTS wasn't the problem, though. The problem was Operator Error: I had urchintracker() instead of urchinTracker().
     
    susb8383, May 8, 2007 IP
  4. killer2021

    killer2021 Peon

    Messages:
    872
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Definitly going to use this
     
    killer2021, Nov 11, 2008 IP
  5. web2tasarim

    web2tasarim Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I take this as a useful note for analytic problems.

    bsrgds.
     
    web2tasarim, Nov 15, 2008 IP
  6. Aldo

    Aldo Peon

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You know how old this topic is? ._. plus Google Analytics has a new tracking code you can and should use
     
    Aldo, Nov 15, 2008 IP
  7. brad.smith4321

    brad.smith4321 Peon

    Messages:
    249
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    this error sometime comes in google analytics...
     
    brad.smith4321, Feb 14, 2011 IP