Using Regular Expressions in Google Analytics Goals / Funnel Visualisation

Google’s overhaul of all their service UIs seems to be made up of some parts improvement mixed with some parts confusion. I recently wasted a bit of time scratching my head on the Google Analytics goal setup page – it seems pretty obvious once you’ve got it working, however I can see that the UI has potential to let other people make the same mistake I did.

The issue I found comes when you’re looking to use regular expressions in your funnel steps. I was setting up a goal for a site which had multiple steps in its wizard, where each step added an additional parameter to the query string.

The funnel setup looked something like this:

Google’s docs said they supported regular expressions, and it was tracking the percentage of people hitting the goal’s destination URL correctly, however the funnel visualisation wasn’t working at all. What I realised is that in order to use regular expressions in any of your steps, then you have to select “Regular expression” next to your goal’s destination URL, even if you’re not using one to match/find the goal, as is the case in my example.

I’d assumed that “equals to” was fine because the final goal URL was a completely separate page, and didn’t really expect that this dropdown selection applied to the matching logic used for the steps.

When you edit a goal, it applies over the top of your previous data, so this is hardly the end of the world as you can tweak and view data until things appear correct, however it did cause a few “WTF” moments during debugging. Hopefully this post saves someone some time!


posted @ Saturday, April 05, 2014 4:48 PM | Feedback (0)

WordPress hosting, don’t try this at home, kids!

I’ve given WordPress a bit of a bad rap to various people over the years, however I like to think I’ve done so with good reason – it’s incredibly popular, but has some very bad history in terms of security related statistics.

WordPress hosting: Do not try this at home! contains a number of those negative WordPress stats, and makes for interesting reading.


Compromised WordPress blogs were used to host nearly 12,000 phishing sites in February. This represents more than 7% of all phishing attacks blocked during that month, and 11% of the unique IP addresses that were involved in phishing.


WordPress blogs were also responsible for distributing a significant amount of web-hosted malware — more than 8% of the malware URLs blocked by Netcraft in February were on WordPress blogs, or 19% of all unique IP addresses hosting malware.


Those are some scary stats. If you’re going to use WordPress, you need to make sure you’ve secured it properly.

How, you ask?

Well, for a start, you might want to read Attacking WordPress – run through the article, try out some of what’s discussed on your own site, and see if you can pwn yourself. Or, you could always switch away from WordPress.

posted @ Monday, March 24, 2014 10:17 AM | Feedback (0)

Melbourne IT does it again

I’ve blogged in the past about the terrible Domainz website, and that they’re owned by Melbourne IT who seem to make a lack of security something of a company wide policy.

Well, it’s 2014 and it seems that MelbourneIT stores domain passwords in cleartext.

Just, wow.

posted @ Friday, March 21, 2014 3:16 PM | Feedback (0)

OneNote updates make it look very appealing

I last looked at OneNote quite a while ago, and it didn’t quite take with me. However it looks like now is the time to give it another try. A (free) OSX client on top of the Windows client (which now has revised pricing of its own), syncing to OneDrive, and most importantly, a cloud API.

It’s weird, hoping that you like using a piece of software simply because it ticks so many boxes on paper, and yet that’s the situation I find myself in.

Would you like to know more?

Link: Microsoft launches free OneNote for Mac, freemium OneNote for Windows, and OneNote cloud API for apps

Link: Hands-on with Microsoft’s OneNote for OSX

Link: Office Lens lets you scan documents and whiteboards with your Windows Phone directly into OneNote

Link: Clip the web, right to OneNote

Link: OneNoteDev - OneNote API code samples (includes samples for Windows store, Windows Phone, iOS and Android)

posted @ Wednesday, March 19, 2014 7:56 PM | Feedback (1)

2 Android links, can you see a link between them?

F-Secure: Android accounted for 97% of all mobile malware in 2013, but only 0.1% of those were on Google Play – I guess it’s not so much of a concern if you stick to the Google Play store, however I imagine a lot of people love the “freedom” that Android gives them to grab apps from anywhere. If the stats are correct, that’s a pretty high figure – I wonder why?

Oh, maybe because of ecosystem update issues such as: Android KitKat is now rolling out to Samsung Galaxy devices in the US. KitKat was announced quite some time ago, and only now is Samsung able to roll out updates to the phones it has decided to provide KitKat support for.

While I realise that this isn’t exactly concrete statistical proof, it’s pretty compelling evidence to suggest that the Android way of handling new versions isn’t the best, and is probably contributing to the platform’s issues with malware.

The image below is out of date (can anyone link me to a recent one?), and while searching for an updated one I came across Android Fragmentation Visualized which has some interesting visualisations. It’s taking more of a development-centric viewpoint (look at the number of different screen sizes!), but the version breakdown and Comparison with iOS shows the differences between version adoption rates across the ecosystems.

I can’t wait to see an updated version.


posted @ Sunday, March 09, 2014 1:29 PM | Feedback (0)

Link Roundup - February 23rd 2014

I haven’t done one of these for a while, however I’ve been insanely busy and have been stockpiling a whole bunch of interesting links! adds webhooks – yay! adds unique user tracking, for exceptions and crashes – very handy to work out if there’s a bunch of errors all caused by a single user, or distributed across many users.

Social Kit – Free Photoshop Plugin For Designing Social Profiles And Pages. Currently supports 4 social networks, YouTube, Twitter, Facebook and Google+, and contains templates that allow you to see how things will look when live.

SQL joins visualised using venn diagrams – the actual page title is “…visualised in a surprising way”, but really there’s not much surprise involved. Venn diagrams are hardly revolutionary, but these diagrams could be a handy resource for explaining joins to junior developers. Do junior developers even know what joins are these days, or do they just use O/RMs?

How I'm thinking about browsers these days – pretty valid really, even if you do want to argue about semantics of the word choices.

Checklist: What NOT to do in ASP.NET – Hanselman’s post about a bunch of stuff that should be no surprise to most ASP.NET developers, but probably worth a scan anyway. Did you know he’s a diabetic?

If you don’t use SublimeText then you can switch off about here – although to be honest you’d do yourself a favour if you went and checked it out. Don’t be put off by the fact that many of the links below include screenshots of OSX, SublimeText works really well on Windows too.

18 Essential Plugins To Get More Out Of SublimeText – I don’t use any of these and still reckon I get a lot of out of SublimeText, but YMMV.

SublimeText Cheat Sheet – a collation of keyboard shortcuts that you could probably find by reading some documentation.

Flatland is a theme/colour scheme for SublimeText 2 and 3, mostly derived from Soda.

posted @ Saturday, February 22, 2014 8:04 AM | Feedback (0)

NHibernate training resources

NHibernate Training – a course which has just been made available freely on Github. Should be a useful resource for anyone looking to get started, or to expand their knowledge of NHibernate.

NHibernate is the most powerful and advanced Object Relational Mapper available for the .NET platform. But with great power comes great responsibility and typically, a steep learning curve. This course aims to lower that learning curve to 3 intensive days where participants will learn all about the most important features of NHibernate, as well as be instructed on how to use those features responsibly to achieve the best possible results.

This course will be hands-on with exercises to be completed by the participants. Some experience with NHibernate is recommended, though not required for the fast learners amongst us. Experience with C# 3.0 or higher is required. This course currently targets NHibernate 3.2, and will be kept up to date with future NHibernate versions.

posted @ Friday, February 21, 2014 7:29 PM | Feedback (0)

Telecom uses magical newfound technology called “SSL” to fix ALL THE THINGS

In Telecom beefs up email security, Telecom discusses how they plan to use a magical newfound technology described as “SSL” to fix their on-going email security issues. A Telecom customer was quoted as saying “Praise Jeebus! We’re saved!” as the revelation of this newfound technology shows Telecom’s commitment to continuing to security excellence.

posted @ Sunday, February 09, 2014 8:43 PM | Feedback (0)

Useful IIS Rewrite Rules

Even with the plethora of routing options available in ASP.NET, there are still times when you want to manipulate a URL and would prefer to do it outside of code. When that’s the case, your best bet is most likely going to be to use IIS’s Rewrite Module.

Why can it be useful to keep rewrites/redirects out of code? Being able to push various URL transformations out of code and into config can give you the flexibility to do a few things in a much cleaner and easier way:

  • Perform transformations that you’d only ever want to happen in production, such as ensuring all users access your site via the www URL, and forcing HTTPS for various pages, without needing to resort to polluting your codebase such as “if(HOSTNAME == “localhost”)”
  • Perform redirections for old or moved content, again, without the need to pollute your code
  • Easily implement SEO tweaks and optimizations quickly and easily (such as domain specific robots.txt files for a codebase which has bindings to multiple domains), again, without code, to make it easy to make revisions via config, so a deployment isn’t needed whenever any change is made.

The IIS Rewrite Module is easy to use, however for some rules it can take a bit of trial and error to get your syntax correct. After using it for many projects across multiple customers, I thought it might be useful to put up a post containing a small collection of the useful rules I’ve come across, for your copying and pasting pleasure.

This post will be a living document, and I’ll add useful rules as I come across, use, and test them.

Add www Prefix

This rule adds the “www” prefix to any URL, which is a common SEO requirement.

<rule name="non www to www" enabled="true">
  <match url="(.*)" />
    <add input="{HTTP_HOST}" negate="true" pattern="^www\.([.a-zA-Z0-9]+)$" />
  <action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent" />

Remove www Prefix

Want the reverse option? Sure, use this rule to remove the www prefix:

<rule name="Remove www" stopProcessing="true">
  <match url="(.*)" ignoreCase="true" />
  <conditions logicalGrouping="MatchAll">
    <add input="{HTTP_HOST}" pattern="^www\.(.+)$" />
  <action type="Redirect" url="http://{C:1}/{R:0}" appendQueryString="true" redirectType="Permanent" />

Redirect from Domain1 to Domain2

Most useful if you’ve changed your site name, or want to catch an alias and send it through to your main site. If your old/new URLs share common elements then you could adapt this so that the matching pattern and the redirect target was smarter rather than having it hardcoded – this is the simple no fuss version.

<rule name="Domains, there can be only ONE" enabled="true">
  <match url="(.*)" ignoreCase="true" />
    <add input="{HTTP_HOST}" pattern="" />
  <action type="Redirect" url="{R:0}" appendQueryString="true" redirectType="Permanent" />

Simple Content Redirection/Mapping

Useful for when you’ve reorganised a site, and want to ensure that old/removed URLs go through to a replacement page. In this example, a load of old pages are now sent through to the ‘services’ page.

<rule name="toservices" stopProcessing="true">
  <match url="^(analysis-design|custom-development|webhosting|websites|video).*" ignoreCase="true"/>
  <action type="Redirect" url="/services/" redirectType="Permanent" appendQueryString="true" />

Redirection Based on a Specific Subdomain

Match a subdomain and redirect it somewhere else – we used this to remove a deprecated blog site. Could easily be adapted to send through to if required (i.e. moving your blog off a subdomain for SEO reasons).

In the case described above, you’ll also want to add the hostname of the old blog domain to the destination site’s bindings.

<rule name="Remove Blog" stopProcessing="true" enabled="true">
  <match url="(.*)" ignoreCase="true" />
    <add input="{HTTP_HOST}" pattern="^(blog\.)(.*)$" />
  <action type="Redirect" url="" redirectType="Permanent" />

Content Redirection, Conditional on Domain Name

This is similar to the case above, but used for a slightly different case. We had one site bound to multiple domain names, and wanted to  use a “preview” URL to test product functionality, while leaving it disabled for anyone accessing via So anyone who doesn’t have the secret preview site domain can’t hit the product URLs.

<rule name="conditional products redirect" enabled="true">
  <match url="^products(.*)" ignoreCase="true" />
    <add input="{HTTP_HOST}" pattern="" />
  <action type="Redirect" url="/coming-soon-page/" appendQueryString="false" redirectType="Found" />

Domain Conditional Sitemaps

This caters for an instance where you have a single site which serves multiple domain names, and you want to have a specific Sitemap served up per domain. Note that this is not a redirect, it’s a rewrite. The example matches based on NZ/AU specific domain suffixes, and can be altered as per your requirements. This also works nicely for domain specific robots.txt files.

<rule name="sitemapnz" enabled="true">
  <match url="^sitemap.xml" ignoreCase="true"/>
    <add input="{HTTP_HOST}" pattern="\.co\.nz"/>
  <action type="Rewrite" url="/sitemapnz.xml"/>

<rule name="sitemapau" enabled="true">
  <match url="^sitemap.xml" ignoreCase="true"/>
    <add input="{HTTP_HOST}" pattern="\.com\.au"/>
  <action type="Rewrite" url="/sitemapau.xml"/>

Remove Default.aspx

For some ASP.NET sites, /Default.aspx is synonymous with “/”. This is a nice simple way of making your URLs tidier, mostly for visual purposes.

<rule name="Default Document" stopProcessing="true">
  <match url="(.*?)/?Default\.aspx$" ignoreCase="true"/>
  <action type="Redirect" url="{R:1}"/>

HTTP/HTTPS Redirection

This is probably one of the best reasons to use UrlRewrite – sending users between HTTP/HTTPS can often lead to horrible conditional statements in your code checking for dev/test mode. This allows a much tidier way to handle it without the need for such statements.

Obviously this one has a pair of rules, one for each way. Both rules have a check as to whether the protocol in use is http/https. Both rules are working on the same list of “pages” (URL patterns) to match, however the redirect to HTTP is not matching those pages (i.e. it’s the reverse of the first), and has a couple of .NET/site specific paths for exclusion.

<rule name="Redirect to HTTPS" stopProcessing="true">
  <match url="^(myaccount|checkout|login|logout|register|forgotpassword|changepassword).*" ignoreCase="true" />
    <add input="{HTTPS}" pattern="^OFF$" />
    <add input="{HTTP_HOST}" pattern="^([\d\w\.]+)" />
  <action type="Redirect" url="https://{C:1}{REQUEST_URI}" redirectType="SeeOther" appendQueryString="false" />

<rule name="Redirect to HTTP" stopProcessing="true">
  <match url="^(?!webresource|_assets|handlers|myaccount|checkout|login|logout|register|forgotpassword|changepassword).*" ignoreCase="true" />
    <add input="{HTTPS}" pattern="^ON$" />
    <add input="{HTTP_HOST}" pattern="^([\d\w\.]+)" />
  <action type="Redirect" url="http://{C:1}{REQUEST_URI}" redirectType="SeeOther" appendQueryString="false" />

Other useful links

Link: URL Rewrite Module Configuration Reference

Link: Ourace IIS rewrite rules – contains a number of other SEO ones which I’d not used before, but look useful. Specifically removing the trailing slash, converting all URLs to lowercase, and returning the 503 Status Code.


posted @ Tuesday, January 14, 2014 9:19 PM | Feedback (0)

Secure networking does not involve Java

Like most people who work in IT I have many VPN connections into various client environments. As I work with multiple customers, I have multiple sets of VPN software installed (5 at last count). Some of the software is better than others, but all of them seem to have something which annoys me. For example, the Palo Alto Networks GlobalProtect client insists on always running, and as it’s a service there’s no way to quit / load it when needed.

However, that’s nothing compared to this:



What the actual fuck?

It’s 2014, and given the past couple of years that Java has had (and to be honest, Cicso had a pretty terrible security year in 2013), how can any vendor insist on requiring Java for a product which is supposed to enable secure remote computing and keep a straight face? Is this a private joke, and there’s someone hiding in my cupboard with a camera about to jump out and post my reaction when the little red bar popped up online?

Java and Secure do not live in the same sentence unless there’s an “in” in front of “Secure”.

As a side note, I mentioned the PAN VPN client. If you use this and don’t want it running all the time, then here’s a little batch file that you might like – I call it fml.cmd, but you can choose any name you want, and it toggles the state of the Pan Global Protect service:

@echo off

for /F "tokens=3 delims=: " %%H in ('sc query PanGPS ^| findstr "        STATE"') do (
  if /I "%%H" NEQ "RUNNING" ( net start PanGPS  ) ELSE ( net stop PanGPS )


posted @ Monday, January 13, 2014 3:00 PM | Feedback (0)

About me

My name is Ross Hawkins and I'm a developer, consultant, business owner and writer based in Auckland, New Zealand (pictured below!). My current work revolves around ASP.NET, C#, jQuery, Ajax, SQL Server, and a mix of other Microsoft development technologies.

I also have about 15 years of experience with IBM Lotus Notes/Domino and associated technologies. While Notes/Domino is no longer my primary focus I still like to dabble and keep my skills up to date.

I own and run 2 businesses - Hawkins Consulting Services, and Ignition Development.

Bethells Beach, located in sunny West Auckland, New Zealand


Subscribe to this feed


Popular Content

Troubleshooting WebResource.axd

The .NET 2.0 framework changed the way clientside JavaScript is delivered to the browser. Previously, ASP.NET 1.1 used the aspnet_client directory whereas now 2.0 uses WebResource.axd.

Published on October 8, 2006

Useful IIS Rewrite Rules

The IIS Rewrite Module is easy to use, however for some rules it can take a bit of trial and error to get your syntax correct. After using it for many projects across multiple customers, I thought it might be useful to put up a post containing a small collection of the useful rules I’ve come across, for your copying and pasting pleasure.

Published on January 14, 2014

jQuery Wildcard Selectors - some simple examples

I wrote about jQuery wildcard selector syntax briefly back in 2009, and since then that post has received a lot of views – way more than a post that brief should ever have seen..

Published on October 14, 2011

Microsoft AJAX Extensions: Sys.Debug is null or not an object

One of the breaking changes which was made with the 1.0 release of the Microsoft Ajax Extensions was the renaming of the 'Debug' class to 'Sys.Debug' for reasons of compatiability with other frameworks. Breaking changes like this can often be a source of frustration..

Published on May 22, 2007

Simple ASP.NET Character Counter

A textbox character counter is a pretty simple piece of functionality, and there's a lot of different ways to apply one to your application. The following method is nice and simple, and can be done using only clientside JavaScript if required, or combined with server side code in order to create a more dynamic effect

Published on December 4, 2006

Simple ASP.NET Character Counter - with Master Page Support

A quick update to my previous character counter article adding some changes for those using it with Master Pages.

Published on February 7th, 2009

Adding Tooltips to Gridview Headers

As the title says, this is a very simple but dynamic way of achieving tooltip text on a header column. It's not overly flash, but it's lightweight and quick to implement.

Published on April 15, 2007

SQL Server Web Report Viewer Issues on Windows 2008 Server/IIS7

A fix for another AXD related issue, this time with the SQL Server Web Report Viewer Control which was being served up via IIS7 on a Windows 2008 server.

Published on June 2, 2007
Updated on April 10, 2008


April, 2014 (1)
March, 2014 (4)
February, 2014 (3)
January, 2014 (4)
December, 2013 (6)
November, 2013 (2)
October, 2013 (3)
September, 2013 (5)
August, 2013 (5)
July, 2013 (3)
June, 2013 (2)
May, 2013 (3)
April, 2013 (2)
March, 2013 (2)
February, 2013 (3)
January, 2013 (5)
December, 2012 (4)
November, 2012 (4)
October, 2012 (3)
September, 2012 (3)
August, 2012 (4)
July, 2012 (1)
June, 2012 (4)
May, 2012 (2)
April, 2012 (4)
March, 2012 (2)
February, 2012 (4)
January, 2012 (3)
December, 2011 (3)
November, 2011 (8)
October, 2011 (9)
September, 2011 (8)
August, 2011 (5)
July, 2011 (4)
June, 2011 (7)
May, 2011 (5)
April, 2011 (3)
March, 2011 (8)
February, 2011 (4)
January, 2011 (3)
December, 2010 (8)
November, 2010 (5)
October, 2010 (6)
September, 2010 (7)
August, 2010 (11)
July, 2010 (12)
June, 2010 (8)
May, 2010 (8)
April, 2010 (4)
March, 2010 (8)
February, 2010 (6)
January, 2010 (12)
December, 2009 (13)
November, 2009 (11)
October, 2009 (12)
September, 2009 (12)
August, 2009 (2)
July, 2009 (7)
June, 2009 (12)
May, 2009 (9)
April, 2009 (9)
March, 2009 (9)
February, 2009 (8)
January, 2009 (7)
December, 2008 (6)
November, 2008 (7)
October, 2008 (9)
September, 2008 (12)
August, 2008 (9)
July, 2008 (6)
June, 2008 (24)
May, 2008 (13)
April, 2008 (16)
March, 2008 (8)
February, 2008 (10)
January, 2008 (1)
December, 2007 (14)
November, 2007 (11)
October, 2007 (11)
September, 2007 (13)
August, 2007 (11)
July, 2007 (5)
June, 2007 (15)
May, 2007 (11)
April, 2007 (9)
March, 2007 (9)
February, 2007 (10)
January, 2007 (8)
December, 2006 (18)
November, 2006 (11)
October, 2006 (14)
September, 2006 (9)
August, 2006 (10)
July, 2006 (4)
June, 2006 (4)
May, 2006 (6)
April, 2006 (3)
February, 2006 (6)
January, 2006 (10)
September, 2005 (2)
August, 2005 (4)

Post Categories

NZ Trains
Visual Studio
Web Development