Refactor undefined check for mainjs, add a challengeName to email signup page

pull/128/head
Nathan Leniz 2015-02-27 05:02:52 +09:00
parent 8acf44ed86
commit 2cc469e293
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,5 @@
$(document).ready(function() {
challengeName = challengeName || 'Untitled';
challengeName = typeof challengeName !== undefined ? challengeName : 'Untitled';
if (challengeName) {
ga('send', 'event', 'Challenge', 'load', challengeName);
}

View File

@ -66,3 +66,5 @@ block content
br
br
br
script.
var challengeName = 'Email Signup'