Add Google Analytics setting and fix errors in facebook callback