mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 20:03:12 +03:00
Wired up link-tracking to Ghost services
refs https://github.com/TryGhost/Team/issues/1888
This commit is contained in:
parent
ae281eb226
commit
b564e2bd66
@ -288,6 +288,7 @@ async function initServices({config}) {
|
|||||||
const memberAttribution = require('./server/services/member-attribution');
|
const memberAttribution = require('./server/services/member-attribution');
|
||||||
const membersEvents = require('./server/services/members-events');
|
const membersEvents = require('./server/services/members-events');
|
||||||
const linkReplacement = require('./server/services/link-replacement');
|
const linkReplacement = require('./server/services/link-replacement');
|
||||||
|
const linkTracking = require('./server/services/link-click-tracking');
|
||||||
|
|
||||||
const urlUtils = require('./shared/url-utils');
|
const urlUtils = require('./shared/url-utils');
|
||||||
|
|
||||||
@ -315,6 +316,7 @@ async function initServices({config}) {
|
|||||||
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
|
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
|
||||||
}),
|
}),
|
||||||
comments.init(),
|
comments.init(),
|
||||||
|
linkTracking.init(),
|
||||||
linkReplacement.init()
|
linkReplacement.init()
|
||||||
]);
|
]);
|
||||||
debug('End: Services');
|
debug('End: Services');
|
||||||
|
18
ghost/core/core/server/services/link-click-tracking/index.js
Normal file
18
ghost/core/core/server/services/link-click-tracking/index.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
class LinkTrackingServiceWrapper {
|
||||||
|
init() {
|
||||||
|
if (this.service) {
|
||||||
|
// Already done
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wire up all the dependencies
|
||||||
|
const LinkTrackingService = require('@tryghost/link-tracking');
|
||||||
|
|
||||||
|
// Expose the service
|
||||||
|
this.service = new LinkTrackingService();
|
||||||
|
|
||||||
|
return this.service.init();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = new LinkTrackingServiceWrapper();
|
@ -82,6 +82,7 @@
|
|||||||
"@tryghost/kg-mobiledoc-html-renderer": "5.3.7",
|
"@tryghost/kg-mobiledoc-html-renderer": "5.3.7",
|
||||||
"@tryghost/limit-service": "1.2.3",
|
"@tryghost/limit-service": "1.2.3",
|
||||||
"@tryghost/link-redirects": "0.0.0",
|
"@tryghost/link-redirects": "0.0.0",
|
||||||
|
"@tryghost/link-tracking": "0.0.0",
|
||||||
"@tryghost/logging": "2.3.0",
|
"@tryghost/logging": "2.3.0",
|
||||||
"@tryghost/magic-link": "0.0.0",
|
"@tryghost/magic-link": "0.0.0",
|
||||||
"@tryghost/mailgun-client": "0.0.0",
|
"@tryghost/mailgun-client": "0.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user