changed end-to-end publish label
This commit is contained in:
parent
64edbb3619
commit
dedf13c316
3 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ module.exports = {
|
|||
const params = createPublishTimingEventParams(category, variable, label, startTime, endTime);
|
||||
sendGoogleAnalyticsTiming(siteName, params);
|
||||
},
|
||||
chooseGaPublishLabel (publishParams) {
|
||||
chooseGaLbrynetPublishLabel (publishParams) {
|
||||
if (publishParams.channel_name || publishParams.channel_id) {
|
||||
return 'PUBLISH_IN_CHANNEL_CLAIM';
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ const logger = require('winston');
|
|||
const config = require('../config/speechConfig.js');
|
||||
const { apiHost, apiPort } = config.api;
|
||||
const lbryApiUri = 'http://' + apiHost + ':' + apiPort;
|
||||
const { chooseGaPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');
|
||||
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('./googleAnalytics.js');
|
||||
|
||||
const handleLbrynetResponse = ({ data }, resolve, reject) => {
|
||||
logger.debug('lbry api data:', data);
|
||||
|
@ -32,7 +32,7 @@ module.exports = {
|
|||
params: publishParams,
|
||||
})
|
||||
.then(response => {
|
||||
sendGATimingEvent('lbrynet', 'publish', chooseGaPublishLabel(publishParams), gaStartTime, Date.now());
|
||||
sendGATimingEvent('lbrynet', 'publish', chooseGaLbrynetPublishLabel(publishParams), gaStartTime, Date.now());
|
||||
handleLbrynetResponse(response, resolve, reject);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
@ -175,7 +175,7 @@ module.exports = (app) => {
|
|||
},
|
||||
});
|
||||
// record the publish end time and send to google analytics
|
||||
sendGATimingEvent('end-to-end', 'publish', 'publish endpoint', gaStartTime, Date.now());
|
||||
sendGATimingEvent('end-to-end', 'publish', fileType, gaStartTime, Date.now());
|
||||
})
|
||||
.catch(error => {
|
||||
errorHandlers.handleErrorResponse(originalUrl, ip, error, res);
|
||||
|
|
Loading…
Add table
Reference in a new issue