Posted by & filed under Developer Blog.

At my company, we use Omniture SiteCatalyst for our web analytics/tracking. Unfortunately, Omniture does not give user’s Flash Version statistics in their standard reports like Google Analytics does. On the other hand, Omniture gives you the freedom to create custom reports that you can determine on your own using their provided JavaScript code.

I am already using SWFObject to load the flash piece on our homepage to users with a specified version. So I figured I could hack that code a bit in order to pull the version it was already determining for me, and plug it into the Omniture code.

After mulling through the SWFObject code, I finally was able to run this page successfully, which will alert the exact version of flash I am using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>test</title>
<script type="text/javascript" src="swfobject.js"></script>
</head><body>
<script type="text/javascript">
alert(deconcept.SWFObjectUtil.getPlayerVersion().major+
"."+deconcept.SWFObjectUtil.getPlayerVersion().minor+
"."+deconcept.SWFObjectUtil.getPlayerVersion().rev);
</script>
</body>
</html>

Basically, you can use deconcept.SWFObjectUtil.getPlayerVersion().major to get the major version, etc.

Once I got that working, I was able to use that same concept to plug it into my tracking code.