blog

An assortment of thoughts.  Mostly tech related.

A Textexpander snippet for marketers - Google URL builder

When creating links to your content for your marketing and promotion online, you should always add some additional tracking information so that you can properly attribute that marketing effort against your goals and conversions.  If you're a Google Analytics user, you should use the Google URL Builder tool to build appropriate UTM parameters into your links.

What are UTM parameters?

From Google:

How do I add UTM parameters to my links?

As a minimum, you should use three UTM parameters attached to a target URL - utm_campaign, utm_source and utm_medium.  (You can use more for split testing and to report against keywords using utm_content and utm_term, but this article is just covering the basics).

Here are the UTM parameters and brief descriptions:

  • Campaign (utm_campaign) - a name to identify the campaign the link is part of e.g. easter2015sale, newsletter6

    e.g. utm_campaign=easter
     
  • Source (utm_source) - Identifies the source or referrer, i.e. where the link has been used. Examples include: facebook, googleplaces, twitterprofile, bannerad, cpc, email etc

    e.g. utm_source=fb
     
  • Medium (utm_medium) - a broader term to identify the general type of marketing medium  used e.g. socialmedia, print, paidads etc

    e.g. utm_medium=social

Your link (built manually using these examples) would look like this (without the line break):

yourlink.com/?utm_source=fb&utm_medium=social&utm_campaign=easter

That's a bit of a nuisance to have to type up, and Google's URL Builder is great and simple enough to use, but I often forget to go there - always remembering after the fact.  I also find that it breaks my stride and involves a bit of clicking back and forth so I decided to build something simple that worked in the context of what I happen to be doing at the time.

Build it automatically - TextExpander to the rescue

If you're a TextExpander user (and if you're on a Mac and not using it, buy it now!), I've built another super-simple snippet to build properly constructed links containing UTM parameters, that ensures you get proper attribution of your online efforts in your Google Analytics reports, using a short fill-in form: 

To activate it, I type the abbreviation: gurlbuilder (weird, yes, but it's highly memorable!) and the fill-in form will appear. I fill in the blanks, click OK and then, bloop, out pops my properly formed, attributed link.

Download my Google URL Builder Snippet here:

Once the TextExpander bundle has downloaded, double click it and it'll add a new group to your existing TextExpander snippets named Google URL Builder containing the snippet.

Here's the simple code too for those that prefer to roll their own:

%filltext:name=Your Target URL%/?utm_source=%filltext:name=Campaign Source%&utm_medium=%filltext:name=Campaign Medium%&utm_campaign=%filltext:name=Campaign Name%

Test, and test again

Before you put it to work, test it out, and make sure it records the information you need in your Google Analytics dashboards.  From then on, use UTM-parameter-tagged-links daily in all of your marketing.  Never again post a 'naked' link. Instead, from now on, see exactly (not roughly) what's working (and what isn't) in your online campaigns.

What do you think?  Any suggestion on how it could be used/improved? Leave your feedback below. Thanks!

I ain't afraid of no ghosts! - Google Analytics and ghost referrals

Image courtesy of Sony Pictures

Image courtesy of Sony Pictures

"Bustin' makes me feel good!"

(Apologies to Ray Parker Jr and Sony Pictures)

Lately, I've been getting a lot of spam traffic to Leftfoot from fake 'ghost' referrers.  These bogus traffic sources have been contaminating my Google Analytics to the point where I've needed to do something about it.  In particular, I've been getting a lot of traffic from sites like social-buttons.org and in the last few days, I've been suspicious about traffic from addons.mozilla.org.  I'm still not 100% sure about the traffic from addons.mozilla.org, but given the large number of visits and the fact that they're all from Russia and to my homepage, I think I'm right to question their legitimacy, so I've taken them out too. Sorry, Russian mozilla fans.

Ben Travis from Viget Advance has an excellent post explaining how to remove ghost referral spam from your Google Analytics views and reports.  The post explains how to filter the view using regex strings both on the incoming side (so these referrers never make it to your Google Analytics dashboards in the first place), but also how to retroactively filter this traffic from your historic data using segments in your Google Analytics dashboards.

Note

It's important to remember that whenever you add a filter to a view, it ONLY affects traffic arriving after the filter has been switched on - it doesn't filter any traffic that arrived prior. 

The other golden rule with filtering at the view level is - Always maintain a clean, unfiltered view - make the view-filtering changes to a separate view.  It's just good practice.

I've implemented both the filtering and segmenting methods following Ben's advice and using his helpful regex strings.  I highly recommend reading through Ben's article for the great background and detail and to grab the regex strings in full.

Building a segment

Segments in Google Analytics allow you to filter traffic from your reports and dashboards based on particular criteria.  In this case, we want to build a segment that filters traffic from sources matching the offending sites supposed hostnames.

How?

I've built a traffic segment called 'No Ghosts' which shows me ALL web traffic except the ghost referrals.

To create a new segment click Add Segment, then + NEW SEGMENT and from there choose Advanced > Conditions and build something like this:

Be sure to see the post above for the full regex strings.

Be sure to see the post above for the full regex strings.

This segment filtering is fairly easy to set up, just be mindful of these small gotchas:

  1. Be sure to add them as EXCLUDE filters
  2. When combining multiple filter criteria be sure to use the OR option so that all of the rules fire the way they should
  3. Be sure to set the filter criteria to matches regex for regex expressions and I've used exactly matches for addons.mozilla.org

Now, no more ghosts! ...at least from these sources. Just make sure you have the segment selected when you view your dashboard widgets.

For fledgling sites with modest traffic, it'd be heartbreaking to implement filtering like that this as it can seriously diminish your traffic numbers, but if you're relying on these inflated bogus numbers, I'm sorry to say - you're kidding yourself about the popularity of your site.  It's like weighing yourself on the scales with one foot on the ground.  Start off on the right (left?) foot, fix it, be more confident that the traffic to your site is genuine and build it up from there.

Who ya gonna call?

Sorry.  ;) But, if we can help you with your own 'ghostbusting', or with any of your Google Analytics setup, let us know and we'll be only too happy to help you clean things up.