Remove unused utm_source from your urls

Sometime last year I noticed that links to my blog on Feedburner had attracted a few extra parameters. A simple link to a post became this huge monstrosity:

http://ocaoimh.ie/exploit-scanner-095/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+HolyShmoly+(Holy+Shmoly!)&
utm_content=Google+Reader

It’s a marketing thing right? It’s all useful information but I don’t really care about it, have never used it and don’t like my URLs getting mangled. It annoys me for two reasons:

  • People will probably use that big long url in their own posts. Other people will use the shortened custom permalink that my blog provides. Won’t the pagerank earned by the post be split in two now?
  • It makes caching less efficient. Supercache won’t create a static cached file of the page. It will create a regular php powered cache file but when you’re running Supercache you want the very best performance don’t you?

So I added a new option to Supercache to redirect the url and get rid of the utm_source bloat.

If you want to give it a go, grab the development version of the plugin and upgrade.

Oh, and if someone has decent docs on utm_source and it’s friends I’d love to read it. Google didn’t return much when I went looking.


Discover more from Something Odd!

Subscribe to get the latest posts to your email.

26 thoughts on “Remove unused utm_source from your urls

  1. Thanks for the update.

    What’s the status of the object cache support feature? I ran into a problem using one of those plugins designed for the latest eAccelerator — only blank pages were generated.

    Peace,
    Gene

  2. I haven’t changed anything in the object cache support of late. It works for me and I haven’t had time to look at our cache backends unfortunately.

    Are you sure the object cache was installed correctly? Was it caching normal WP objects?

  3. Yes, it does seem to operate, since there’s a noticeable speed boost. The file simple goes directly into the wp-content folder. I’ve used them before.

    Peace,
    Gene

    1. Hmm, a blank page is usually a syntax error but could be anything unfortunately. If I get a chance, I’ll test a few more object cache backends. Thanks for trying it though!

  4. Way beyond my pay grade to figure this out. 🙂

    Basically, I used the latest eAccelerator, since it’s bundled with cPanel and thus has some degree of support. But they won’t support a potential conflict with a WordPress plugin, since they don’t provide that level of help.

    There are several object-cache.php versions out there. I just plucked the latest I could find. I can send it to you if you wish.

    Peace,
    Gene

  5. It’s actually very very interesting data that those links provide: they allow you to track, in Google Analytics, how much people clicked on your FeedBurner links and thus came to your site (in Google Analytics speak it’s called “campaign tracking”). I do agree that it isn’t playing nice with caching though, but there’s a better solution to this than what you’re doing now.

    As Otto says, Google does use the rel=”canonical” that WordPress now offers, so it shouldn’t split PageRank anymore, BUT: it still has to crawl 2 URL’s when you get links like these.

    Google Analytics allows for tracking these parameters with a hash, instead of a question mark. So, instead of:

    http://ocaoimh.ie/exploit-scanner-095/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+HolyShmoly+(Holy+Shmoly!)&
    utm_content=Google+Reader

    You could have:

    http://ocaoimh.ie/exploit-scanner-095/#utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+HolyShmoly+(Holy+Shmoly!)&
    utm_content=Google+Reader

    The difference is subtle, but makes all the difference for both caching and indexing. To do this, you need to slightly modify your Google Analytics tracking script though: you need to add pageTracker._setAllowAnchor(true); before the _trackPageview call. If you’ve done that, you can safely redirect the question mark version to the hash tagged version, and enjoy the benefits of both proper caching and campaign tracking.

    You could use that data for all sorts of uses, I see, for instance, that you track your AdSense clicks (in a kind of roundabout way, btw), you could see whether people coming from your RSS feed actually click more or less on those ads.

    Of course, if you think all of this is too much hassle, you could use my Google Analytics for WordPress plugin and check the box for “Use # instead of ? for Campaign tracking?” and for “Track AdSense”, and have all of this taken care of for you: it’ll take care of the redirects from ? to # URL’s, it’ll add the setAllowAnchor, and it’ll integrate your AdSense and Google Analytics accounts.

  6. Feedburner is a perfect deterrent. I’m signed up to about a dozen feeds, but religiously refuse to do it if a person uses Feedburner. Regardless of how interesting a site, Feedburner is a complete turn off.

  7. @Donncha

    Quick off topic question. I’m using the Prologue WordPress theme.

    On the post-form.php, it includes the following code

    Will using wp_nonce_field() work with using SuperCache to cache a page?

    Thanks and again, apologies for it being off topic.

    1. Your code got stripped Frank, but a nonce probably will work as long as the expiry time isn’t excessive. If you had it longer than 24 hours then the nonce would expire. Make it short, say 10 minutes, and you should be fine.

      1. Hi Donncha

        The code is:

        wp_nonce_field( ‘new-post’ );

        Also, how do I set wp_nonce_field to have a shorter expiration time?

  8. Thanks all for the comments. I think I’ll turn off that feature in Feedburner. I guess I didn’t find it because I was looking for the wrong thing!

  9. UTM stands for Urchin Traffic Monitor which is part of the Urchin Analytics product, acquired by Google when they released Google Analytics, thus the naming remains. Anyways, if you use Google Analytics you’ll find these parameters very useful to track several marketing campaigns, sources and mediums. It’s not just another way to track down your refferer.

    For instance, if you’re purchasing two banners on website.com, one 468×60 and another 100×100, you can track down the hits, showing website.com as source, banner advert as medium and two different campaigns – 468×60 and 100×100, thus you’ll know where people click and where they don’t. All this is shown in your Google Analytics reports.

    Sweet thing btw, you should check it out if you still didn’t 😉 I added GA tagging in my Twitter Friendly Links plugin, which transforms http://kovshenin.com/712 into http://kovshenin.com/wordpress/plugins/twitter-friendly-links/?utm_source= … etc, thus I’m always able to track where people are coming from. You know, twitter.com referrer is not the only Twitter client around. Others come up as “Direct hits” while they could be hits from TweetDeck or Seesmic, or even Echofon.

    Cheers,
    ~ @kovshenin

  10. I think there may be a bug when coping with the path when wordpress is not installed in the root directory. See the following example:

    ~$ curl -IL http://goo.gl/fb/5lxQ
    HTTP/1.1 301 Moved Permanently
    Location: http://feeds.feedburner.com/~r/xitong/~3/gxgSlPasM4Q/?

    HTTP/1.1 301 Moved Permanently
    Location: http://foremire.com/blog/2010/02/udcssa-kungfu/?utm_source=feedburner&utm_medium=twitter&utm_campaign=Feed%3A+xitong+%28Xitong+Liu%29

    HTTP/1.1 301 Moved Permanently
    Location: http://foremire.com/blog/blog/2010/02/udcssa-kungfu/

    HTTP/1.1 301 Moved Permanently
    Location: http://foremire.com/blog/2010/02/udcssa-kungfu/

    HTTP/1.1 200 OK

    Intuitively it produced one redundant 301 redirection:

    http://foremire.com/blog/blog/2010/02/udcssa-kungfu/ to
    http://foremire.com/blog/2010/02/udcssa-kungfu/

    while my wordpress is installed at http://foremire.com/blog/

  11. @Joost de Valk: Thanks, I finally removed that redirect code and instead pointed at your comment in a FAQ entry in the readme.txt

Leave a Reply