HTTPS to Google Analytics

Dec 9, 2010 at 8:12 AM

Please don't tell me I just wasted half a day setting this all up.....

I have a SL4 app served up via HTTPS. Can I record events to Google Analytics?



Dec 9, 2010 at 8:25 AM

I have a SL4 app that is https only.

I got a tracking code on google analytics and specificed https.

I setup the tracking script on the site, and google immediately said the tracking code was ok, and tracking data.

I then setup MSAF to track events. I tested locally, and I can see the events, categories, and actions I tested locally with that got reported to google analytics.

I uploaded the changes to the actual SL4 app running under https, and none of the tracking seems to be working....

Is there an actual HTTPS issue, or is this something else?

Google says https is no problem:


Dec 9, 2010 at 2:54 PM

The GoogleAnalytics behavior should work with https.  It is based on the DocumentUri for the host web page.  If it doesn't work, please create an issue in the Issue Tracker with a reproducible test case.  Here is the relevant code:

if (logEvent.DocumentUri.IsAbsoluteUri && logEvent.DocumentUri.Scheme == "https")
    scheme = "https://ssl";
    scheme = "http://www";
Dec 9, 2010 at 6:48 PM

Thanks Michael, That is a relief.


I set everything up on google, put the tracking in the app, and tested it locally (http/localhost). That night, I could see that my events were getting recorded on google analytics. I publish my code to our production server (https). Over the past 2 days, I am seeing tracking for the default.aspx landing page, but I do not see the tracking events I setup with MSAF. I open fiddler, turn on HTTPS, and I do in fact see my tracking events being fired to google from production(https), and they are all getting status 200's back. I test again locally, and that evening I see the events got tracked. The ones on the server are still not showing up.

How can I troubleshoot this? Obviously I am doing something wrong, but not sure what else to check.