fixed spelling and ternary

This commit is contained in:
bill bittner 2018-03-06 16:23:21 -08:00
parent dedf13c316
commit 24b95280be

View file

@ -13,11 +13,11 @@ function createServeEventParams (headers, ip, originalUrl) {
}; };
function createPublishTimingEventParams (category, variable, label, startTime, endTime) { function createPublishTimingEventParams (category, variable, label, startTime, endTime) {
const durration = endTime - startTime; const duration = endTime - startTime;
return { return {
userTimingCategory : category, userTimingCategory : category,
userTimingVariableName: variable, userTimingVariableName: variable,
userTimingTime : durration, userTimingTime : duration,
userTimingLabel : label, userTimingLabel : label,
}; };
}; };
@ -51,10 +51,7 @@ module.exports = {
const params = createPublishTimingEventParams(category, variable, label, startTime, endTime); const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);
sendGoogleAnalyticsTiming(siteName, params); sendGoogleAnalyticsTiming(siteName, params);
}, },
chooseGaLbrynetPublishLabel (publishParams) { chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {
if (publishParams.channel_name || publishParams.channel_id) { return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');
return 'PUBLISH_IN_CHANNEL_CLAIM';
}
return 'PUBLISH_ANONYMOUS_CLAIM';
}, },
}; };