Cleaned up old member activity code usage

refs https://github.com/TryGhost/Team/issues/2216

The `membersActivity` flag was an alpha feature to test the first versions of member analytics, and is no longer active or in use. This change removes the remaining pieces of code that are setup behind that flag and are no longer in use or accessible.
This commit is contained in:
Rishabh 2022-11-11 11:16:21 +05:30 committed by Rishabh Garg
parent 9a290b6f77
commit d4c3f86ce0
3 changed files with 1 additions and 9 deletions

View File

@ -2,7 +2,7 @@
// Usage: `{{ghost_head}}`
//
// Outputs scripts and other assets at the top of a Ghost theme
const {metaData, settingsCache, config, blogIcon, urlUtils, labs, getFrontendKey} = require('../services/proxy');
const {metaData, settingsCache, config, blogIcon, urlUtils, getFrontendKey} = require('../services/proxy');
const {escapeExpression, SafeString} = require('../services/handlebars');
// BAD REQUIRE
@ -207,12 +207,6 @@ module.exports = async function ghost_head(options) { // eslint-disable-line cam
head.push('<meta name="generator" content="Ghost ' +
escapeExpression(safeVersion) + '" />');
// Ghost analytics tag
if (labs.isSet('membersActivity')) {
const postId = (dataRoot && dataRoot.post) ? dataRoot.post.id : '';
head.push(writeMetaTag('ghost-analytics-id', postId, 'name'));
}
head.push('<link rel="alternate" type="application/rss+xml" title="' +
escapeExpression(meta.site.title) + '" href="' +
escapeExpression(meta.rssUrl) + '" />');

View File

@ -62,7 +62,6 @@ module.exports = function setupMembersApp() {
membersApp.post('/api/create-stripe-checkout-session', (req, res, next) => membersService.api.middleware.createCheckoutSession(req, res, next));
membersApp.post('/api/create-stripe-update-session', (req, res, next) => membersService.api.middleware.createCheckoutSetupSession(req, res, next));
membersApp.put('/api/subscriptions/:id', (req, res, next) => membersService.api.middleware.updateSubscription(req, res, next));
membersApp.post('/api/events', labs.enabledMiddleware('membersActivity'), middleware.loadMemberSession, (req, res, next) => membersService.api.middleware.createEvents(req, res, next));
// Comments
membersApp.use('/api/comments', commentRouter());

View File

@ -1394,7 +1394,6 @@ Object {
</script>
<meta name=\\"generator\\" content=\\"Ghost 4.3\\" />
<meta name=\\"ghost-analytics-id\\" content=\\"\\" />
<link rel=\\"alternate\\" type=\\"application/rss+xml\\" title=\\"Ghost\\" href=\\"http://localhost:65530/rss/\\" />
<script defer src=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/sodo-search.min.js\\" data-key=\\"xyz\\" data-styles=\\"https://cdn.jsdelivr.net/npm/@tryghost/sodo-search@~[[VERSION]]/umd/main.css\\" data-sodo-search=\\"http://127.0.0.1:2369/\\" crossorigin=\\"anonymous\\"></script>",