#!/bin/sh # # Add a Google Analytics tag to static website files # @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages # Tested on MacOS 10.8.X # # Usage: # Set the GA parameters below # Execute the script from the top-level of the static site # GA_TRACKER_ID='UA-XXXXXXX-X' GA_DOMAIN='YOUR-DOMAIN.COM' GA_CODE=$(cat <