I’ve just finished setting this up on an AJAX-heavy site I’m working on. It’s all pretty easy to setup, copy the following code and use it to replace your standard analytics code:
ga('create', 'UA-xxxxxxxx-x', 'xxxx.com');
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
url: '/contents/get_content_by_id/' + id,
//Push view to analytics
_gaq.push(['_trackPageview', '/contents/get_content_by_id/' + id]);
//Remove loader and display error
Just add the line commented Push view to analytics and you’re done. To test it, I just used to the real-time analytics – it shows up straight away. If you run into any trouble the docs are pretty decent: https://developers.google.com/analytics/devguides/collection/gajs/
Well, today I was looking through the Google Analytics overview of the WhatIBroke.com and I noticed a referral I hadn’t seen before from link.smartscreen.live.com.
I did a bit of Googling and it turns out that this is actually something Microsoft uses within IE and MSN. Apparently, whenever someone clicks on a link in msn the service will check the link against a list of unsafe sites and warn the user if anything is amiss.
It just so happens that I’d sent a link to the blog to a friend on msn – so I guess everything checks out. Here’s a bit of a blurb from the FAQ on Microsoft’s Site:
SmartScreen Filter is a feature in Internet Explorer that helps detect phishing websites. SmartScreen Filter can also help protect you from downloading or installing malware (malicious software).
SmartScreen Filter helps to protect you in three ways:
As you browse the web, it analyses webpages and determines if they have any characteristics that might be suspicious. If it finds suspicious webpages, SmartScreen will display a message giving you an opportunity to provide feedback and advising you to proceed with caution.
SmartScreen Filter checks the sites you visit against a dynamic list of reported phishing sites and malicious software sites. If it finds a match, SmartScreen Filter will show you a warning notifying you that the site has been blocked for your safety.
SmartScreen Filter checks files that you download from the web against a list of reported malicious software sites and programs known to be unsafe. If it finds a match, SmartScreen Filter will warn you that the download has been blocked for your safety. SmartScreen Filter also checks the files that you download against a list of files that are well known and downloaded by many Internet Explorer users. If the file that you’re downloading isn’t on that list, SmartScreen Filter will warn you.
Anyway, that’s all I’ve got for now – Good Luck!