wip cleaning up
better analytics integration