Adding try-catch for google analytics calls