fix broken analytics tracking introduced in #1507

This may not be the most elegant approach but it does fix tracking issue.