Easy JavaScript Internationalization in Rails using the I18n-js gem

Ruby on Rails provides a well-documented and established Internationalization API for server-side localization. However, many projects I've seen forget to internationalize their front-end JavaScript framework and end up hard-coding text everywhere. For some people, this works, but for larger projects…

A Happy RSpec, Capybara and DatabaseCleaner Setup

There have been a few times where I ran into problems with RSpec Capybara feature specs and DatabaseCleaner. Spec issues arise because most Capybara JavaScript drivers run your specs on a different thread than the app. This Stack Overflow Answer…

Removing Google Analytics Referral Spam

If you use Google Analytics, especially if you have a small site, you may notice referral traffic from weird domains with 1 pageview, 0 time on site, 0 conversions and 100% bounce rate. This is garbage traffic and it comes…

How to Create a Trackable link for Google Analytics

Trackable links (URLs) are critical to understanding return-on-investment for various digital marketing initiatives by providing additional information on how the visitor arrived to your site. Without trackable links, Google Analytics (or any web analytics tool) would count this visitor from…