Recently, coming back to do some work for one of my favourite clients, they asked me to look into slowdowns on their site, reported by their loyal customers as well as admin staff.
Once in a while the users browsers would give a warning about scripts taking excessive time to complete. After a little investigation, I found a couple of scripts taking quite a while to execute when the page loads. One script I’d written myself, and did execute somewhat slowly, and I’ll rewrite that sometime next week. For now I’ve tweaked it to use about 50% less time, but it can run a lot faster.
The biggest slowdown, and the cause of the increase in mails to customer support, was the recent addition of a tracking script from Omnitures SiteCatalyst, a web tracking tool.
On an admin page on the clients site, the script showed 1500+ calls to the same (anonymous) function … so I thought I’d stress it a bit, and created some extra data for the same admin page … well a lot of extra data, about three times as much as it had been exposed to before. Soon I had the script at 4500+ calls to the same function, and execution time had skyrocketed to 20+ seconds!!! All of this was at page load, effectively preventing any interaction with the site, ultimately very bad for business.
Now the client had implemented SiteCatalyst by request of Enterprise Decision Makers. Basically the entire enterprise is running SiteCatalyst on all their major sites. Having one tool for keeping track of your websites makes very good sense.
The client is also running Google Analytics, a tool they chose themselves, to allow them to make educated decisions about their website.
So, back to the problem of SiteCatalyst tracking script taking excessive time to run.
Since Omniture protects their scripts by obfuscation, my only option was to call their support hotline. No worries, I thought, the client already had a support agreement and the name of guy to speak to, so I just called him. Very pleasant guy, gave me instructions on how to get hime some data to work with. I saved the offending page and all associated assets, allowing it to be run from a folder on a local machine. Sent it off via email, praying for a quick resolution.
No repsonse, no call, no email, nothing. After calling them several times over several days, leaving messages for the guy to call me back, I finally get a mail (two days later), saying we’re running the wrong version of the script. Fine, I replace the script with the most current version, same result. Grrrr. Ok, so maybe there’s some misconfiguration on our end, but everything looks fine so far. I suspect that we’re in part to blame for misconfiguring the script in some way, but wading through their documentation, I’ve yet to find a clue to why it behaves so badly.
Meanwhile, I’ve been looking at the implementation of the script … one global object seems to control everything … ok, fine, that makes perfect sense, and is a practice that many vendors in the industry use … the object’s name is … “s”. Ouch.
Fortunately, we’ve tried to keep our scripting as robust as possible, and I don’t see any clashes with this (so far), but still … “s”.
So, while waiting on Omnitures somewhat slow support, let’s try to evaluate the impact that both Google Analytics and SiteCatalyst has on the user experience.
Firstly, the page I am using for the profiling, is a real world page on the clients site, with a fair amount of scripting. It’s the first page a user sees after being logged into the website. Most of the scripting we’ve done, improves the user experience in some way, allowing the users to do more with the site. Analytics scripting does nothing to directly improve user experience, and it’s impact on the whole user experience should be kept to an absolute minimum.
Gathering data using the profiler in Firebug, yields some interesting results.
| Custom | Google Analytics | SiteCatalyst | |
|---|---|---|---|
| # Calls | 728 | 33 | 850 |
| Execution time (ms) | 38,45 | 2,21 | 18 |
| Increase in calls | 4,5% | 116% | |
| Increase in execution time | 5,74 | 46,8 |
The custom scripting is both scripts written for the site specifically, as well as library scripts such as Prototype, Scriptaculous, LowPro and more.
The page for the test has 25 links in total. Comparing these results with the ones from the admin page, I am guessing that the SiteCatalyst tracking script has some serious scaling issues.
It’s yet unclear to me what the conclusion of all this should be, other than for this particular page, Google Analytics has an insignificant impact on the user experience, where SiteCatalyst on the other hand, has a noticable impact, and goes completely nuts when the page grows to a certain size and complexity.
From a business perspective, I can see several disadvantages of SiteCatalyst compared to Google Analytics.
- Significant impact on user experience – Going from 46% increase in load time to completely unusable.
- Monthly service fee – I don’t know how big, since it’s nowhere to be found on Omnitures website
- Very hard to configure – Google Analytics in comparison, takes about 5mins to set up succesfully
- Substandard support – Not even confirming emails or setting any kind of expected time of response does not win many customers
It would be really interesting if I could get my hands on a non-obfuscated version of both the tracking scripts to see what’s really going on, but am not holding my breath. While I wait for the support guy to come back to me, I think I’ll rewrite some of the slow(er) scripts I’ve done myself.
