Skip to content

Commit f47f0ac

Browse files
committed
removed some more Ganalytics code
1 parent 03063f3 commit f47f0ac

File tree

6 files changed

+3
-52
lines changed

6 files changed

+3
-52
lines changed

app/frontend/src/qaqc/components/QaQcExports.vue

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,7 @@ export default {
8989
}
9090
return url;
9191
},
92-
sendAnalyticsEvent(format) {
93-
if (window.ga) {
94-
window.ga('send', {
95-
hitType: 'event',
96-
eventCategory: 'Button',
97-
eventAction: 'WellSearchResultsExtract',
98-
eventLabel: format,
99-
});
100-
}
101-
},
10292
async handleExportClickEvent(format) {
103-
// Send the analytics event
104-
this.sendAnalyticsEvent(format);
10593
10694
// Generate the URL for the file download
10795
const url = this.getExportUrl(format);
@@ -156,4 +144,4 @@ export default {
156144
.qaqc-download-button:active {
157145
background-color: rgba(0, 0, 0, 0.2); /* Darker overlay when clicked */
158146
}
159-
</style>
147+
</style>

app/frontend/src/registry/components/search/SearchHome.vue

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -418,15 +418,6 @@ export default {
418418
if (params.hasOwnProperty('offset')) {
419419
delete params.offset
420420
}
421-
422-
if (window.ga) {
423-
window.ga('send', {
424-
hitType: 'event',
425-
eventCategory: 'Button',
426-
eventAction: 'RegistrySearch',
427-
eventLabel: querystring.stringify(params)
428-
})
429-
}
430421
this.SEARCH(params)
431422
},
432423
sortTable (sortCode) {

app/frontend/src/wells/components/Documents.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
{{ data.item.date_of_upload !== -1 ? new Date(data.item.date_of_upload).toLocaleDateString() : "Date Unknown" }}
3939
</template>
4040
<template v-slot:cell(uploaded_document)="data">
41-
<a :href="data.item.url" :download="data.item.name" target="_blank" @click="handleDownloadEvent(data.item.name)">{{ data.item.name }}</a>
41+
<a :href="data.item.url" :download="data.item.name" target="_blank">{{ data.item.name }}</a>
4242
</template>
4343
<template v-slot:cell(document_status)="data">
4444
<p v-if="data.item.document_status">Private Document</p>
@@ -119,17 +119,6 @@ export default {
119119
...mapActions('documentState',
120120
['removeFileFromStore']
121121
),
122-
handleDownloadEvent (file) {
123-
if (window.ga) {
124-
// ga('send', 'event', 'Attachment', 'Accessed', 'Original Well Record')
125-
window.ga('send', {
126-
hitType: 'event',
127-
eventCategory: 'Attachment',
128-
eventAction: 'Accessed',
129-
eventLabel: `Original Well Record ${file}`
130-
})
131-
}
132-
},
133122
callLongFormLabel(shortFormLabel) {
134123
return getLongFormLabel(shortFormLabel);
135124
},

app/frontend/src/wells/components/Exports.vue

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<p class="font-weight-bold">Download all wells</p>
1818
<ul>
1919
<li v-for="file in files" :key="file.name">
20-
<a :href="file.url" v-on:click="handleDownloadClick(file)" target="_blank">Well extract ({{file.description}})</a> ({{format_size(file.size)}}) - {{format_date(file.last_modified)}}
20+
<a :href="file.url" target="_blank">Well extract ({{file.description}})</a> ({{format_size(file.size)}}) - {{format_date(file.last_modified)}}
2121
</li>
2222
</ul>
2323
</div>
@@ -46,16 +46,6 @@ export default {
4646
// If the size is really small, this would go to zero if rounded down - so we rather round up.
4747
return `${Math.ceil(size / 1024 / 1024)} MB`
4848
},
49-
handleDownloadClick (file) {
50-
if (window.ga) {
51-
window.ga('send', {
52-
hitType: 'event',
53-
eventCategory: 'Button',
54-
eventAction: 'WellExtract',
55-
eventLabel: file.description
56-
})
57-
}
58-
}
5949
}
6050
}
6151
</script>

app/frontend/src/wells/components/SearchResultExports.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export default {
100100
},
101101
/**
102102
* @desc Gets the correctly formatted export URL given the filetype and leverages users Auth to send download request
103-
* then sends Google Analytics request
104103
* @summary Downloads search data for file format.
105104
* @param {string} format Filetype: "csv", "xlsx"
106105
*/

app/frontend/src/wells/views/WellDetail.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,6 @@ export default {
646646
errorNotFound () {
647647
return this.error && this.error.status === 404
648648
},
649-
analytics () {
650-
return !!window.ga
651-
},
652649
show () {
653650
return {
654651
edit: !!this.config && this.userRoles.wells.edit === true
@@ -680,9 +677,6 @@ export default {
680677
},
681678
methods: {
682679
handlePrint () {
683-
if (window.ga) {
684-
window.ga('send', 'event', 'Button', 'print', 'Wells Summary Print')
685-
}
686680
window.print()
687681
},
688682
fetchWellData () {

0 commit comments

Comments
 (0)