mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
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:
parent
7b8bf8977c
commit
93b936d2fb
@ -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'
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -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);
|
||||
})
|
||||
|
@ -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);
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user