Added JS functions for tracking page layout in Analytics

Uses Google Analytics custom variables
Various misc. updates