This project is read-only.

pageTracker doesn't seem to work with specified URI

Oct 27, 2010 at 1:03 PM

Symptom: A SL4 website using GA via 0.3 of SilverlightAnalytics is reporting all pseudo page hits as "/"

I dropped the following code into the html:

	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	
	<script type="text/javascript">
		try
		{
			var pageTracker = _gat._getTracker("UA-8582917-1");
			pageTracker._trackPageview("/LandingPage");
		}
		catch(err) {}
	</script>

and the following code into the code behind of the application page:

        private void ContentFrame_Navigated(object sender, NavigationEventArgs e)
        {
            if (e.Uri.ToString().Length > 0)
            {
                SilverlightAnalytics.Analytics analytics = new SilverlightAnalytics.Analytics();
                analytics.TrackPageview(e.Uri.ToString());
            }
        }
When I run in the debugger I see a proper string for the URI being passed to TrackPageview, however, the GA site report shows only hits to "/".  Any ideas?