mirror of
https://github.com/anyproto/anytype-ts.git
synced 2025-06-11 18:20:27 +09:00
Merge pull request #603 from anyproto/feature/JS-3989-object-creation-analytics
Feature/JS-3989: Object creation analytics
This commit is contained in:
commit
eec32caa32
2 changed files with 7 additions and 1 deletions
|
@ -404,6 +404,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
|
||||
if (item.itemId == SystemIds.Search) {
|
||||
this.onExpand();
|
||||
analytics.event('ScreenObjectTypeSearch');
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -492,13 +493,14 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
|
||||
case 'pin': {
|
||||
isPinned ? Storage.removePinnedType(item.itemId) : Storage.addPinnedType(item.itemId);
|
||||
analytics.event(isPinned ? 'UnpinObjectType' : 'PinObjectType', { objectType: item.uniqueKey, route: 'Navigation' });
|
||||
this.forceUpdate();
|
||||
break;
|
||||
};
|
||||
|
||||
case 'default': {
|
||||
commonStore.typeSet(item.uniqueKey);
|
||||
analytics.event('DefaultTypeChange', { objectType: item.uniqueKey, route: 'Settings' });
|
||||
analytics.event('DefaultTypeChange', { objectType: item.uniqueKey, route: 'Navigation' });
|
||||
this.forceUpdate();
|
||||
break;
|
||||
};
|
||||
|
@ -506,6 +508,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
case 'remove': {
|
||||
if (blockStore.isAllowed(item.restrictions, [ I.RestrictionObject.Delete ])) {
|
||||
Action.uninstall({ ...item, id: item.itemId }, true);
|
||||
analytics.event('ObjectUninstall', { route: 'Navigation' });
|
||||
};
|
||||
break;
|
||||
};
|
||||
|
@ -561,6 +564,8 @@ class MenuQuickCapture extends React.Component<I.Menu, State> {
|
|||
const type = dbStore.getTypeById(commonStore.type);
|
||||
const data = await this.getClipboardData();
|
||||
|
||||
analytics.event('CreateObject', { route: 'Clipboard' });
|
||||
|
||||
data.forEach(async item => {
|
||||
let text = '';
|
||||
let html = '';
|
||||
|
|
|
@ -599,6 +599,7 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag
|
|||
|
||||
if (blockStore.isAllowed(item.restrictions, [ I.RestrictionObject.Delete ])) {
|
||||
Action.uninstall(item, true);
|
||||
analytics.event('ObjectUninstall', { route: 'Library' });
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue