Added back "theme.uploaded" analytics event (#10450)

no issue

- With the changes in 79ca6c575c we removed old unused events
- The theme upload event is still used and needed to be put back
- Added the event emit right after the successful upload of the theme
- Renamed analytics events for more consistency
- We need to add the same event emitter to the v0.1 API as it's not deprecated
- emits a `theme.uploaded` event after the theme was successfully uploaded and saved
This commit is contained in:
Aileen Nowak 2019-02-05 23:38:40 +07:00 committed by Katharina Irrgang
parent 7b8bf8977c
commit 93b936d2fb
3 changed files with 10 additions and 2 deletions

View File

@ -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'
}
];

View File

@ -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);
})

View File

@ -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);
})