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) {
|
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';
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue