Feature/mixpanel update 28 7

You should just define the variable before the 'if'.