Switch to custom analytics code

Modified from H5BP