mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Moved Segment analytics file into service
- this file is already in our "init"-style, so this commit simply moves the file into a service and fixes the import paths
This commit is contained in:
parent
1ecf77db48
commit
51a25769eb
@ -352,7 +352,7 @@ async function initServices({config}) {
|
||||
|
||||
// Initialize analytics events
|
||||
if (config.get('segment:key')) {
|
||||
require('./server/analytics-events').init();
|
||||
require('./server/services/segment').init();
|
||||
}
|
||||
|
||||
debug('End: initServices');
|
||||
|
@ -1,11 +1,12 @@
|
||||
const _ = require('lodash');
|
||||
const Analytics = require('analytics-node');
|
||||
const config = require('../shared/config');
|
||||
const logging = require('@tryghost/logging');
|
||||
const sentry = require('../shared/sentry');
|
||||
|
||||
const config = require('../../../shared/config');
|
||||
const sentry = require('../../../shared/sentry');
|
||||
|
||||
// Listens to model events to layer on analytics - also uses the "fake" theme.uploaded event from the theme API
|
||||
const events = require('./lib/common/events');
|
||||
const events = require('../../lib/common/events');
|
||||
|
||||
module.exports.init = function () {
|
||||
const analytics = new Analytics(config.get('segment:key'));
|
Loading…
Reference in New Issue
Block a user