diff --git a/core/server/analytics-events.js b/core/server/analytics-events.js index 3fc7e15cb6..c0efa7a5ac 100644 --- a/core/server/analytics-events.js +++ b/core/server/analytics-events.js @@ -13,11 +13,15 @@ module.exports.init = function () { toTrack = [ { event: 'post.published', - name: 'Blog Post Published' + name: 'Post Published' }, { event: 'page.published', - name: 'Blog Page Published' + name: 'Page Published' + }, + { + event: 'theme.uploaded', + name: 'Theme Uploaded' } ]; diff --git a/core/server/api/v0.1/themes.js b/core/server/api/v0.1/themes.js index f27e4a16cb..53b1c86e9d 100644 --- a/core/server/api/v0.1/themes.js +++ b/core/server/api/v0.1/themes.js @@ -136,6 +136,8 @@ themes = { themeUtils.activate(loadedTheme, checkedTheme); } + common.events.emit('theme.uploaded'); + // @TODO: unify the name across gscan and Ghost! return themeUtils.toJSON(zip.shortName, checkedTheme); }) diff --git a/core/server/api/v2/themes.js b/core/server/api/v2/themes.js index 5386236141..0e7da2a47e 100644 --- a/core/server/api/v2/themes.js +++ b/core/server/api/v2/themes.js @@ -122,6 +122,8 @@ module.exports = { this.headers.cacheInvalidate = true; } + common.events.emit('theme.uploaded'); + // @TODO: unify the name across gscan and Ghost! return themeService.toJSON(zip.shortName, checkedTheme); })