JS error on the page occurs if the google-analytics.com/urchin.js isn't loaded. It can happen if, for example, google-analytics is blocked by AdBlock (I have the following situation). After that, a JS error is indicated and other JS code doesn't work. May be, you should use "try{urchinTracker();}catch(e){}" instead of "urchinTracker();"?

Comments

hass’s picture

Priority: Normal » Minor

I tend to say "by design"

hass’s picture

Does someone knows if this create an issue with GA tracking code verification?

try{urchinTracker();}catch(e){};

try{pageTracker._trackPageview();}catch(e){};

hass’s picture

Title: JS error on the page » Execute page tracker with try/catch
hass’s picture

Status: Active » Closed (works as designed)
hass’s picture

Status: Closed (works as designed) » Closed (duplicate)

Updated to new tracking code. Therefore feature have been implemented now and this case is a duplicate of #357944: Support for try / catch block (per google's recommendations).