Prehistoric Browsers, conversion.js, and How I Came to Love Drupal.settings
We’ve been working on a website that all of a sudden developed a really specific and annoying problem. After going to any page in the site, the page would load, then would instantly go to a white screen and sit there forever. This only happened to certain users, and was tough to duplicate from any of my dev environments.
Digging deeper, I found that the issue was with the Google Analytics conversion.js script, but only with circa version 3 Firefox and Safari, and it appeared that this issue came up as a result of some change on Google’s side — our site used to work fine with these browsers, then something changed and broke. The “white” page was loading a 1px-by-1px tracking pixel from Google, and inexplicably timing out on some request to an Adsense server.
Our site was loading the Adsense conversion tracking script in 3 situations — general browsing, and based on two specific user-conversion actions. The general browsing instance was handled by the Google Analytics module. We added the conversion tracking code in the “post-snippet code” to automatically add a reference to Google’s conversion.js script on every page. For the pre-historic browsers, that spelled a death-knell for the site.