Quick Tip: Analytics and InPrivate Browsing

Whatever analytics package you use to understand your site traffic, it likely uses cookies or IP addresses to exclude your visits from the statistics. If yours is cookie-based, it’s a good idea (particularly if you’re doing a bunch of edits or other maintenance) to avoid browsing your site using Internet Explorer’s InPrivate mode (or similar modes on other browsers), since it will not send the cookie(s), and as such your visits won’t be excluded.

How do I know this? Often, I’ll have a browser window open in InPrivate mode when I need to use different credentials from my day-to-day browsing, such as for admin tasks on my Azure services.

The other day I was working on updating all the videos on my site to use a responsive design (see bonus tip below), and later saw the following in my analytics dashboard, which made it obvious that I had not followed this advice:

BlogEditsFromInPrivateMode

Colorful, yes, but not terribly useful for me to be including my own visits in my stats.

Of course, if your analytics framework uses cookies for excluding visits from your development machine, you should also be aware when using browsers other than the one where you set the cookie, unless you take the time to set this up on each browser you use for testing.

Lesson learned, on my part.


BONUS TIP: My co-worker Stacey Mulcahy pointed me to http://embedresponsively.com/, which makes it really easy to just plug in your video link and/or iframe markup, and generate the necessary styles and markup to embed a video window that will resize appropriately to the window or device size. One thing I’d recommend is that you add the styles it generates to your main stylesheet (particularly if you minify your styles), so that you can reduce the amount of redundant CSS you end up publishing.

EXTRA BONUS TIP: If you’re using WebMatrix 2 or 3, there’s a nifty extension called OrangeBits Compiler that makes minification a breeze. Just edit the CSS file, right-click, and minify. It automatically adds –min to the filename, easy-peasy:

OrangeBits

Code, Community, and Coffee
Built with Hugo
Theme Stack designed by Jimmy