diff --git a/analytics/src/main/java/com/anytypeio/anytype/analytics/base/EventsDictionary.kt b/analytics/src/main/java/com/anytypeio/anytype/analytics/base/EventsDictionary.kt index f0a85d13a3..4e94dfe2d6 100644 --- a/analytics/src/main/java/com/anytypeio/anytype/analytics/base/EventsDictionary.kt +++ b/analytics/src/main/java/com/anytypeio/anytype/analytics/base/EventsDictionary.kt @@ -87,6 +87,7 @@ object EventsDictionary { const val objectOpenAs = "OpenAsObject " const val objectReload = "ReloadSourceData" const val objectDuplicate = "DuplicateObject" + const val objectCreateLink = "CreateLink" // Blocks events const val blockCreate = "CreateBlock" diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/EditorViewModel.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/EditorViewModel.kt index faac8f2eaa..a272e03b17 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/EditorViewModel.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/editor/EditorViewModel.kt @@ -202,6 +202,7 @@ import com.anytypeio.anytype.presentation.extension.sendAnalyticsBlockBackground import com.anytypeio.anytype.presentation.extension.sendAnalyticsBlockMoveToEvent import com.anytypeio.anytype.presentation.extension.sendAnalyticsBlockReorder import com.anytypeio.anytype.presentation.extension.sendAnalyticsBookmarkOpen +import com.anytypeio.anytype.presentation.extension.sendAnalyticsCreateLink import com.anytypeio.anytype.presentation.extension.sendAnalyticsGoBackEvent import com.anytypeio.anytype.presentation.extension.sendAnalyticsMentionMenuEvent import com.anytypeio.anytype.presentation.extension.sendAnalyticsObjectCreateEvent @@ -3191,6 +3192,7 @@ class EditorViewModel( }, onSuccess = { result -> orchestrator.proxies.payloads.send(result.payload) + sendAnalyticsCreateLink(analytics) sendAnalyticsObjectCreateEvent( analytics = analytics, type = objectTypeView.key, diff --git a/presentation/src/main/java/com/anytypeio/anytype/presentation/extension/AnalyticsExt.kt b/presentation/src/main/java/com/anytypeio/anytype/presentation/extension/AnalyticsExt.kt index 737de33e9d..59263e4b20 100644 --- a/presentation/src/main/java/com/anytypeio/anytype/presentation/extension/AnalyticsExt.kt +++ b/presentation/src/main/java/com/anytypeio/anytype/presentation/extension/AnalyticsExt.kt @@ -1961,6 +1961,15 @@ private fun getAnalyticsObjectType( return objType?.sourceObject ?: OBJ_TYPE_CUSTOM } +fun CoroutineScope.sendAnalyticsCreateLink( + analytics: Analytics +) { + sendEvent( + analytics = analytics, + eventName = EventsDictionary.objectCreateLink + ) +} + //region Self-Hosting fun CoroutineScope.sendAnalyticsSelectNetworkEvent(