How to track if Silverlight is turned on

I am trying to get some statistics about how many visitors to our site have browsers with Silverlight support.

We currently use Google Analytics for the rest of our statistics, so ideally we would just like to add Silverlight tracking to the rest of our Google Analytics statistics. But if this should be recorded in the database, etc., then so be it.

Nikhil has some javascript for tracking Silverlight in Google Analytics. I tried this code, but Google Analytics does not raise it.

Does anyone have any other ideas / methods?

+4
source share
5 answers

If you missed it, add a link to a more detailed article in the comments: http://blogs.msdn.com/jeffwilcox/archive/2007/10/01/using-google-analytics-with-rich-managed-web-applications- in-silverlight.aspx

Edit: As David noted, this article focuses more on the reverse scenario (how to write a Silverlight application so that it works well with Analytics).

+1
source

I think you yourself answered. The page you are linking to does just that: determine which version of Silverlight the user has (not if he installs it). On the page:

After a little thoughtfulness, I found that Google Analytics supports custom field reporting.

...

This basically determines the presence of Silverlight, and if available, it records the version as the value of a user-defined field. Now your analytical reports will have one of three values: "(not installed)", "Silverlight / 1.0" or "Silverlight / 2.0".

0
source

@Vaibhav
Using Google Analytics with rich (managed) web applications in Silverlight is very interesting, but more focused on how to get a Silverlight application to send messages to Google Analytics.

@ Cd-MAN Yes, I thought it too, but I tried to launch my page using Nikhil javascript, and Google Analytics did not pick it up. But I could screw something.

I'm just curious to know if anyone else has managed to do this (track Silverlight-ness).

0
source

I wrote a small Silverlight library that helps you easily integrate Google Analytics into a Silverlight application. You can download the code or binaries here.

0
source

I think the code posted on Nikhil's blog is deprecated if you use ga.js and not urchin.js.

Using the __utmSetVar() global function is replaced with the _setCustomVar() tracker method

http://code.google.com/apis/analytics/docs/gaJS/gaJSApiBasicConfiguration.html#_gat.GA_Tracker_._setCustomVar

0
source

Source: https://habr.com/ru/post/1276503/


All Articles