diff --git a/src/components/AddLinkButton.vue b/src/components/AddLinkButton.vue index 2e23562..4739039 100644 --- a/src/components/AddLinkButton.vue +++ b/src/components/AddLinkButton.vue @@ -51,6 +51,11 @@ export default { this.$emit('add:share', newShare, resolve) }) showSuccess(t('files_sharing', 'Link share created')) + this.sendUtagInfo({ + wt_link_id: 'button.add-link-share', + page_content_id: 'files.sharing', + page_type: 'files', + }) } catch (data) { const message = data?.response?.data?.ocs?.meta?.message diff --git a/src/mixins/SharesMixin.js b/src/mixins/SharesMixin.js index d4a62c5..f24a835 100755 --- a/src/mixins/SharesMixin.js +++ b/src/mixins/SharesMixin.js @@ -25,6 +25,8 @@ * */ +/* global utag */ + import { showError, showSuccess } from '@nextcloud/dialogs' import { getCurrentUser } from '@nextcloud/auth' // eslint-disable-next-line import/no-unresolved, n/no-missing-import @@ -375,5 +377,10 @@ export default { debounceQueueUpdate: debounce(500, function(property) { this.queueUpdate(property) }), + + sendUtagInfo: (data) => { + if (typeof utag === 'undefined' || !utag.view()) return + utag.view(data) + }, }, } diff --git a/src/utils/CollaboraMimeTypes.js b/src/utils/CollaboraMimeTypes.js index d4ccb82..fe66902 100644 --- a/src/utils/CollaboraMimeTypes.js +++ b/src/utils/CollaboraMimeTypes.js @@ -15,5 +15,5 @@ export const COLLABORA_MIME_TYPES = [ 'application/vnd.oasis.opendocument.graphics', 'application/vnd.visio', 'text/plain', - 'text/markdown' + 'text/markdown', ] diff --git a/src/views/SharingDetailsTab.vue b/src/views/SharingDetailsTab.vue index e90ffa3..62a2431 100755 --- a/src/views/SharingDetailsTab.vue +++ b/src/views/SharingDetailsTab.vue @@ -660,8 +660,18 @@ export default { const share = await this.addShare(incomingShare, this.fileInfo, this.config) this.share = share this.$emit('add:share', this.share) + this.sendUtagInfo({ + wt_link_id: 'button.create-share', + page_content_id: 'files.sharing', + page_type: 'files', + }) } else { this.queueUpdate(...permissionsAndAttributes) + this.sendUtagInfo({ + wt_link_id: 'button.update-share', + page_content_id: 'files.sharing', + page_type: 'files', + }) } this.$emit('close-sharing-details')