diff --git a/assets/dbp-signature.html.ejs b/assets/dbp-signature.html.ejs index 460e26bde2142bfc54de21cfc0d72f66a227ab9e..4422aa75be59d95665b5aa1d402736d4708f85eb 100644 --- a/assets/dbp-signature.html.ejs +++ b/assets/dbp-signature.html.ejs @@ -64,7 +64,7 @@ initial-file-handling-state> <<%= name %> subscribe="lang:lang,entry-point-url:entry-point-url" - auth requested-login-status + auth requested-login-status analytics-event src="<%= getUrl(name + '.topic.metadata.json') %>" base-path="<%= getUrl('') %>" keycloak-config='{"url": "<%= keyCloakBaseURL %>", "realm": "tugraz", "clientId": "<%= keyCloakClientId %>", "silentCheckSsoRedirectUri": "<%= getUrl('silent-check-sso.html') %>"}' diff --git a/src/dbp-official-signature-pdf-upload.js b/src/dbp-official-signature-pdf-upload.js index b461f677cba55c4c502f255cbc5a83ab4c08a15e..3e1d6f3dae8c2883b8f32d3d6e21e3b13937c709 100644 --- a/src/dbp-official-signature-pdf-upload.js +++ b/src/dbp-official-signature-pdf-upload.js @@ -260,9 +260,8 @@ class OfficialSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitElem // this triggers the correct update() execution this.errorFilesCount++; - if (window._paq !== undefined) { - window._paq.push(['trackEvent', 'officiallySigning', 'SigningFailed', file.json["hydra:description"]]); - } + this.sendSetPropertyEvent('analytics-event', { + 'category': 'officiallySigning', 'action': 'SigningFailed', 'name': file.json["hydra:description"]}); } /** diff --git a/src/dbp-qualified-signature-pdf-upload.js b/src/dbp-qualified-signature-pdf-upload.js index 378edeb1082e5195de8cfcf4bc4e9f17c11a55b9..be69cd91bef3174e0dd76e336b20c279252e9910 100644 --- a/src/dbp-qualified-signature-pdf-upload.js +++ b/src/dbp-qualified-signature-pdf-upload.js @@ -337,9 +337,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle // this triggers the correct update() execution that.signedFilesCount++; - if (window._paq !== undefined) { - window._paq.push(['trackEvent', 'QualifiedlySigning', 'DocumentSigned', document.contentSize]); - } + this.sendSetPropertyEvent('analytics-event', { + 'category': 'QualifiedlySigning', 'action': 'DocumentSigned', 'name': document.contentSize}); }).catch(error => { let file = this.currentFile; // let's override the json to inject an error message @@ -380,9 +379,8 @@ class QualifiedSignaturePdfUpload extends ScopedElementsMixin(DBPSignatureLitEle // this triggers the correct update() execution this.errorFilesCount++; - if (window._paq !== undefined) { - window._paq.push(['trackEvent', 'QualifiedlySigning', 'SigningFailed', file.json["hydra:description"]]); - } + this.sendSetPropertyEvent('analytics-event', { + 'category': 'QualifiedlySigning', 'action': 'SigningFailed', 'name': file.json["hydra:description"]}); } /** diff --git a/src/dbp-signature-verification-full.js b/src/dbp-signature-verification-full.js index 05f475941b6203f106ab45044c46b95b3d19a0d4..8cc413cb012b1adf56609fc274c8c8845bd26cde 100644 --- a/src/dbp-signature-verification-full.js +++ b/src/dbp-signature-verification-full.js @@ -181,9 +181,8 @@ class SignatureVerificationFull extends ScopedElementsMixin(DBPSignatureLitEleme // this triggers the correct update() execution this.errorFilesCount++; - if (window._paq !== undefined) { - window._paq.push(['trackEvent', 'officiallyVerification', 'VerificationFailed', file.json["hydra:description"]]); - } + this.sendSetPropertyEvent('analytics-event', { + 'category': 'officiallyVerification', 'action': 'VerificationFailed', 'name': file.json["hydra:description"]}); } /** diff --git a/vendor/toolkit b/vendor/toolkit index 623483aa9cebbe78568b9087949237d565a6480c..6f58ac8c782bca5113cc9c7c9c12c7af5fdc3d73 160000 --- a/vendor/toolkit +++ b/vendor/toolkit @@ -1 +1 @@ -Subproject commit 623483aa9cebbe78568b9087949237d565a6480c +Subproject commit 6f58ac8c782bca5113cc9c7c9c12c7af5fdc3d73