fixed spelling and ternary
This commit is contained in:
parent
dedf13c316
commit
24b95280be
1 changed files with 4 additions and 7 deletions
|
@ -13,11 +13,11 @@ function createServeEventParams (headers, ip, originalUrl) {
|
|||
};
|
||||
|
||||
function createPublishTimingEventParams (category, variable, label, startTime, endTime) {
|
||||
const durration = endTime - startTime;
|
||||
const duration = endTime - startTime;
|
||||
return {
|
||||
userTimingCategory : category,
|
||||
userTimingVariableName: variable,
|
||||
userTimingTime : durration,
|
||||
userTimingTime : duration,
|
||||
userTimingLabel : label,
|
||||
};
|
||||
};
|
||||
|
@ -51,10 +51,7 @@ module.exports = {
|
|||
const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);
|
||||
sendGoogleAnalyticsTiming(siteName, params);
|
||||
},
|
||||
chooseGaLbrynetPublishLabel (publishParams) {
|
||||
if (publishParams.channel_name || publishParams.channel_id) {
|
||||
return 'PUBLISH_IN_CHANNEL_CLAIM';
|
||||
}
|
||||
return 'PUBLISH_ANONYMOUS_CLAIM';
|
||||
chooseGaLbrynetPublishLabel ({ channel_name: channelName, channel_id: channelId }) {
|
||||
return (channelName || channelId ? 'PUBLISH_IN_CHANNEL_CLAIM' : 'PUBLISH_ANONYMOUS_CLAIM');
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue