Google Analytics – Why You Should Replace IDs in URLs

Google Analytics is brilliant at tracking things like Page Views for a website. It logs the URL and then keeps a count of how may times that URL is requested. Great, right? Not always.

There’s a problem. Dynamic sites that use IDs in their URLs generate a lot of different URLs. A typical example might be a site being made up of list and details screens, so the URL for a list screen might end in /List/. For a details page there’s probably one template with the data changing dynamically and the ID for that item is probably in the URL, something like /Details/123 or /Details?id=123.

This means that Google Analytics sees every visit to a different item’s details as a different screen. This is ideal for some data analysis, like seeing which item is viewed most but not so great when you want to look at something like the performance of that template. Having hundreds of different URLs makes it impossible to analyse the template as a single screen.

Good news. It’s quite easy to set up another view to show the aggregated data using filters.

  1. Go to the Admin area and create a new view.
  2. Find Filters and add a new filter.
  3. Add a Filter Name.
  4. Select a Filter Type of Custom.
  5. Use the Search and Replace option.
  6. Select a Filter Field of Request URI.
  7. The Search String needs to match the ID. You can use regex to match any patterns so if you know your ID is 3-5 digits long you can use [0-9]{3,5}. If it varies you could use a wildcard, like id=*.
  8. Add a Replace String. I use something to represent what’s being replaced, like ID. This gives me a URL like /Details/ID or /Details?id=ID. If you’ve used a wildcard in the Search String with part of the URL you can replace this too, like id=ID.

Here’s an example of replacing a GUID in the URL:

Google Analytics Filtering screenshotThe full regex needed is:

[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}

An added bonus. When you look at your reports in Google Analytics you’ll no longer see URLs like /Details/aace7226-0576-4a0f-9b39-bb549a53ee11 but just /Details/GUID. Much easier to understand, especially if your URL contains several IDs or GUIDs.

Hope this helps you analyse your screens, templates or UIs rather than just the data requested.

What to Look For in a Web Designer or Design Agency

Imagine you’re a business owner or marketing bod and you need to get either a new website or you want a redesign of your current, slightly tired looking site. You need to hire a web designer or design agency. How do you tell the good from the bad?

Web designers range from the top end agencies who have major international corporations in their portfolios down to someone’s neighbour’s kid who made a website for someone once. Chances are you want something in between – not paying over the odds and not getting something held together by sticky tape.

Agency or Freelance Designer

I’d say your first choice is knowing whether to go with an individual or an agency. Traditionally agencies would cost you more as they had an office with bills and marketing costs whereas an individual might be working from their room. Today, with more home working, those lines are a bit more blurred and some very good agencies might be made up of remote workers. An agency brings some reassurance, that if a particular person is on holiday for 3 weeks, off ill or leaves then there’s usually someone else to pick up your work, whereas with an individual you might not have that fallback. By the same token, some designers have very sound fallback plans – working with other designers, passing all relevant access back to the client so it can be picked up by another freelancer. It’s really a case of asking the right questions and making sure you feel adequately covered for what you need.

It’s all about how it looks

Look at what the designers have done previously. Obviously consider if the designs look appealing but look slightly beyond that. Is each design tailored to the content of the site or business it represents or are they trotting out the same template for all their sites? An overuse of templates suggests that they’re bashing out sites as quickly as possible for maximum profit rather than really caring about doing a good job.

Actually, it’s not about how it looks

Looks are one thing but how a site performs for you is much more important. It needs to load quickly and display properly on any device. Some sites have great home page animations or big images which cycle to promote things. Whilst these may look great on a desktop they’re a nightmare on a mobile device without WiFi. If a user has to wait 30 seconds for your page to load and then pinch and zoom to read your page, do you think they’ll hurry back? Fast loading and appropriate sizing for all devices is essential.

Ask about page speed and responsive design. If they don’t seem to know about this, or view it as an extra, run, run fast, far away. Responsive design is not a “nice to have” like it was a few years back, it’s critical. Even if you think you’ll never have any mobile visitors, 1) you’re wrong, by the way, and 2) having a site work on mobile is a key factor in Google’s ranking of search results. If it doesn’t perform well on mobile Google’s search ranking algorithm will lock your site in a dungeon and make it eat nothing but porridge for the rest of its anonymous life. Probably.

Relationships

You also need to consider if you’re looking for a one-off piece of work that’s signed off and shipped or an ongoing relationship where they will keep working on your site. Make sure you find out costs for any future work – new features or pages or tweaks to existing stuff – even if you don’t think you’ll need it. It’ll give you a good idea of how they operate.

UK VAT

This applies to the UK. I’m not sure quite how Value Added Tax or equivalents work in other territories. If you’re a small business, individual, club, etc and not VAT registered yourself it may pay to find a freelance designer who is also not VAT registered as it will save you having to pay an extra 20%. This does imply that they’re working at a lower turnover level but for a smaller project this might be a better fit.

Summary

To bring that all together in a nice to do list, ask about the following:

  • Fallback plans if the designer is not available
  • Use of templates
  • Page loading times, especially on mobile
  • Appearance on different devices
  • Ongoing or future work
  • Are they VAT registered (if relevant)?