diff --git a/doc/release-notes/4.20-release-notes b/doc/release-notes/4.20-release-notes.md similarity index 100% rename from doc/release-notes/4.20-release-notes rename to doc/release-notes/4.20-release-notes.md diff --git a/doc/release-notes/6938-analytics-reload b/doc/release-notes/6938-analytics-reload new file mode 100644 index 00000000000..40afb847a21 --- /dev/null +++ b/doc/release-notes/6938-analytics-reload @@ -0,0 +1,5 @@ +### Custom Analytics Code Changes + +You should update your custom analytics code to implement necessary changes for tracking updated dataset and file buttons. There was also a fix to the analytics code that will now properly track downloads for tabular files. + +We have updated the documentation and sample analytics code snippet provided in [Installation Guide > Configuration > Web Analytics Code](http://guides.dataverse.org/en/latest/installation/config.html#web-analytics-code) to reflect the changes implemented in this version (#6938/#6684). \ No newline at end of file diff --git a/doc/sphinx-guides/source/_static/installation/files/var/www/dataverse/branding/analytics-code.html b/doc/sphinx-guides/source/_static/installation/files/var/www/dataverse/branding/analytics-code.html index ca703dddf11..bd8e615349f 100644 --- a/doc/sphinx-guides/source/_static/installation/files/var/www/dataverse/branding/analytics-code.html +++ b/doc/sphinx-guides/source/_static/installation/files/var/www/dataverse/branding/analytics-code.html @@ -10,7 +10,7 @@ function enableAnalyticsEventCapture() { // Download button - $(document).on("click", ".btn-download", function() { + $(document).on("click", ".btn-download, .btn-download.dropdown-toggle + ul.dropdown-menu li a", function() { var category = $(this).text(); var label = getFileId($(this)); gtag('event', 'Download',{'event_category' : category, @@ -26,7 +26,7 @@ }); // Explore button - $(document).on("click", ".btn-explore + ul.dropdown-menu li a", function() { + $(document).on("click", ".btn-explore, .btn-explore.dropdown-toggle + ul.dropdown-menu li a", function() { var category = $(this).text(); var label = getFileId($(this)); gtag('event', 'Explore', {'event_category' : category, @@ -34,7 +34,7 @@ }); // Compute button - $(document).on("click", ".btn-compute", function() { + $(document).on("click", ".btn-compute, .btn-compute.dropdown-toggle + ul.dropdown-menu li a", function() { var category = $(this).text(); var label = getFileId($(this)); gtag('event', 'Compute', {'event_category' : category, @@ -42,7 +42,7 @@ }); // Preview button - $(document).on("click", ".btn-preview", function() { + $(document).on("click", ".btn-preview, .btn-preview.dropdown-toggle + ul.dropdown-menu li a", function() { var category = $(this).text(); var label = getFileId($(this)); gtag('event', 'Preview', {'event_category' : category, @@ -110,7 +110,7 @@ function getFileId(target) { var label = 'Unknown'; - if(target.parents('th').length>0) { + if(target.parents('th, #actionButtonBlock .btn-access-dataset + ul.dropdown-menu').length>0) { //Special case - the Download button that downloads all selected files in the dataset label = 'file(s) from ' + stripId($('#datasetForm').attr('action')); } else { diff --git a/src/main/java/propertyFiles/Bundle.properties b/src/main/java/propertyFiles/Bundle.properties index 86c82c4c6ad..2ed14375089 100755 --- a/src/main/java/propertyFiles/Bundle.properties +++ b/src/main/java/propertyFiles/Bundle.properties @@ -1481,6 +1481,7 @@ file.editFiles=Edit Files file.editFilesSelected=Edit file.editFile=Edit +file.actionsBlock=File Actions file.accessBtn=Access File file.accessBtn.header.download=Download Options file.editBtn=Edit File diff --git a/src/main/webapp/dataset.xhtml b/src/main/webapp/dataset.xhtml index 658b429768e..1be062b4674 100644 --- a/src/main/webapp/dataset.xhtml +++ b/src/main/webapp/dataset.xhtml @@ -161,7 +161,7 @@
  • - +
  • @@ -234,7 +234,7 @@ - + diff --git a/src/main/webapp/file-download-button-fragment.xhtml b/src/main/webapp/file-download-button-fragment.xhtml index 061b1df00fa..87e8bd2f6b4 100644 --- a/src/main/webapp/file-download-button-fragment.xhtml +++ b/src/main/webapp/file-download-button-fragment.xhtml @@ -86,7 +86,6 @@ disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}" actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'original')}"> - @@ -375,9 +374,6 @@ - - - #{bundle['file.requestAccess']} @@ -411,7 +407,6 @@ title="#{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']}" process="@this" onclick="PF('accessSignUpLogIn_popup').show()"> - #{fileMetadata.dataFile.fileAccessRequesters.contains(dataverseSession.user) ? bundle['file.accessRequested'] : bundle['file.requestAccess']} @@ -550,14 +545,4 @@ #{bundle['file.compute']} - - \ No newline at end of file diff --git a/src/main/webapp/filesFragment.xhtml b/src/main/webapp/filesFragment.xhtml index ad61e1f50cd..eb431abc894 100644 --- a/src/main/webapp/filesFragment.xhtml +++ b/src/main/webapp/filesFragment.xhtml @@ -577,6 +577,16 @@ disabled="#{DatasetPage.locked}"> #{bundle['file.requestAccess']} + +
    +