New WordPress plugin: URL Builder for Analytics
tl;dr: I've built a WordPress plugin for creating Google Analytics tracking URLs for your posts, straight in the post editor. Development of the plugin happens on the GitHub repository
Website Analytics in shortWhen doing website analytics, it can be really helpful to know which channels site visitors come from. If you use Google Analytics this can be specified easily, as a couple of GET parameters in the site URL. The main issue here is that remembering the names of the parameters can be bothersome, and writing them manually is error prone. That's why Google supplies a URL builder tool, where you just fill out the fields and it'll give you an URL with the tracking parameters.
URL builder for AnalyticsSince I was doing a bunch of tracking URLs for WordPress posts, I decided it would be helpful to just to it all straight from the WordPress interface. I couldn't find a proper plugin for it, so I decided to build my own, the URL builder for Analytics.
The plugin is pretty simple. It adds a meta box to the edit page of all post types. The meta box has 2 tabs, social sharing, and custom sharing.
Social Sharing[caption id="attachment_1152" align="aligncenter" width="700"] The Social Sharing tab[/caption]
Most of my URL sharing happened on various social channels, so to streamline that I made the social sharing tab, heavily inspired by this linktagger tool (thanks to Søren Sprogøe for showing me that). Using the social sharing you just fill out your campaign name, and the plugin will give you links for various social media sites (Facebook, Twitter, Google+ and LinkedIn). The created links will have it's source set to the social site's name, and the medium will be "social", this ensures consistency for all posts shared to social media.
Custom sharing[caption id="attachment_1155" align="aligncenter" width="700"] The Custom Sharing tabs[/caption]
The other tab allows you to specify your own tracking values for all five of the parameters Google Analytics allows for it's tracking URLs. The plugin will then give you a full tracking URL ready to cut and paste into your newsletter, or where you'd want to use it.
Development and Next stepThe development of the plugin is done on a GitHub repository, which also hosts the current issues and feature requests queue.
The next thing I'd like to add is bit.ly support. This would include doing OAuth authentication with the bit.ly service, allowing the use of the bit.ly URL shortening service, to shorten the URLs and saving them to your bit.ly account.
The plugin can be downloaded from the WordPress repository, and bug reports and feature requests are very welcome both in the issues queue, or in the comments below.