How to find silverlight version using google analytics?
@cameron_walter
Google Analytics does not directly provide information about the version of Silverlight being used. However, you can collect this information by implementing additional tracking code on your website.
To determine the Silverlight version using Google Analytics, you can follow these steps:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<script type="text/javascript"> (function() { var slPlugin = null; if (window.ActiveXObject) { try { slPlugin = new ActiveXObject("AgControl.AgControl"); document.write('<param name="onload" value="pluginLoaded" />'); } catch (e) { slPlugin = null; } } else { if (navigator.plugins["Silverlight Plug-In"]) { slPlugin = true; document.write('<param name="onload" value="pluginLoaded" />'); } } window.pluginLoaded = function() { if (slPlugin) { var silverlightVersion = slPlugin.version; ga('set', 'dimension1', silverlightVersion); ga('send', 'event', 'Silverlight', 'Version', silverlightVersion); } else { ga('set', 'dimension1', 'Not Installed'); ga('send', 'event', 'Silverlight', 'Version', 'Not Installed'); } }; })(); </script> |
1 2 3 |
ga('create', 'UA-XXXXX-Y', 'auto'); ga('set', 'dimension1', 'Not Installed'); // Default value if Silverlight is not installed ga('send', 'pageview'); |
Make sure to replace 'UA-XXXXX-Y'
with your actual Google Analytics property ID.
By following these steps, you will be able to track the Silverlight version being used by your visitors using Google Analytics.